I think this happened in Kasparov game but I am not sure about that. It was minor piece endgame with quite blocked queenside. Black took pawn on the kingside (h4 maybe) and white, instead of 'obvious' pawn recapture, moved his knight, temporarily sacrificing pawn, but kept the position open. I guess it was N vs. B endgame.
You are probably thinking of the game Karpov - Kasparov form round 9 in their first World Championship Match in 1984-85. This match was later called off after 48 games before a winner was declared.
The situation you describe appeared after black's 46th move in this game.
[FEN ""] [Event "World Championship Match"] [Site "Moscow"] [Date "1984.10.05"] [Round "9"] [Result "1-0"] [White "Anatoly Karpov"] [Black "Garry Kasparov"] [Startply "92"] 1.d4 d5 2.c4 e6 3.Nf3 c5 4.cxd5 exd5 5.g3 Nf6 6.Bg2 Be7 7.O-O O-O 8.Nc3 Nc6 9.Bg5 cxd4 10.Nxd4 h6 11.Be3 Re8 12.Qb3 Na5 13.Qc2 Bg4 14.Nf5 Rc8 15.Bd4 Bc5 16.Bxc5 Rxc5 17.Ne3 Be6 18.Rad1 Qc8 19.Qa4 Rd8 20.Rd3 a6 21.Rfd1 Nc4 22.Nxc4 Rxc4 23.Qa5 Rc5 24.Qb6 Rd7 25.Rd4 Qc7 26.Qxc7 Rdxc7 27.h3 h5 28.a3 g6 29.e3 Kg7 30.Kh2 Rc4 31.Bf3 b5 32.Kg2 R7c5 33.Rxc4 Rxc4 34.Rd4 Kf8 35.Be2 Rxd4 36.exd4 Ke7 37.Na2 Bc8 38.Nb4 Kd6 39.f3 Ng8 40.h4 Nh6 41.Kf2 Nf5 42.Nc2 f6 43.Bd3 g5 44.Bxf5 Bxf5 45.Ne3 Bb1 46.b4 gxh4 47.Ng2 hxg3 48.Kxg3 Ke6 49.Nf4+ Kf5 50.Nxh5 Ke6 51.Nf4+ Kd6 52.Kg4 Bc2 53.Kh5 Bd1 54.Kg6 Ke7 55.Nxd5+ Ke6 56.Nc7+ Kd7 57.Nxa6 Bxf3 58.Kxf6 Kd6 59.Kf5 Kd5 60.Kf4 Bh1 61.Ke3 Kc4 62.Nc5 Bc6 63.Nd3 Bg2 64.Ne5+ Kc3 65.Ng6 Kc4 66.Ne7 Bb7 67.Nf5 Bg2 68.Nd6+ Kb3 69.Nxb5 Ka4 70.Nd6 1-0