Gretzky ended his professional playing career with the New York Rangers, where he played his final three seasons and helped the team reach the Eastern Conference Finals in 1997.
The Rangers were defeated in the Conference Finals in five games by the Philadelphia Flyers, despite Gretzky leading the Rangers in the playoffs with 10 goals and 10 assists.
For the first time in his NHL career, Gretzky was not named captain, although he briefly wore the captain's "C" in 1998 when captain Brian Leetch was injured and out of the line-up.
After the 1996–97 season, Mark Messier signed a free agent contract with the Vancouver Canucks, ending the brief reunion of Messier and Gretzky after just one season.
The Rangers did not return to the playoffs until 2006, well after Gretzky retired.
Along with Jaromir Jagr, he topped the NHL in 1997–98 with 67 assists.
It was the 16th time in 19 seasons that Gretzky earned at least a share of the league lead in the statistic.

In 1997, prior to his retirement, The Hockey News named a committee of 50 hockey experts (former NHL players, past and present writers, broadcasters, coaches and hockey executives) to select and rank the 50 greatest players in NHL history.
The experts voted Gretzky number one.
Gretzky said he would have voted Bobby Orr or Gordie Howe as the best of all time.

The 1998–99 season was his last as a professional player.
He reached one milestone in this last season, breaking the professional total (regular season and playoffs) goal-scoring record of 1,071, which had been held by Gordie Howe.
Gretzky was having difficulty scoring this season and finished with only nine goals, contributing to this being the only season in which he failed to average at least a point per game, but his last goal brought his scoring total for his combined NHL/WHA career to 1,072, one more than Howe.
As the season wound down, there was media speculation that Gretzky would retire, but he refused to announce his retirement.
His last NHL game in Canada was on April 15, 1999, a 2–2 tie with the Ottawa Senators and the Rangers' second-to-last game of the season.
Following the contest, in a departure from the usual three stars announcement, Gretzky was awarded all three stars.
Upon returning to New York, Gretzky announced he would retire after the Rangers' last game of the season.

The final game of Gretzky's career was a 2–1 overtime loss to the Pittsburgh Penguins on April 18, 1999, in Madison Square Garden.
Although the game involved two American teams, both national anthems were played, with the lyrics slightly adjusted to accommodate Gretzky's departure.
In place of the lyrics "O Canada, we stand on guard for thee", Bryan Adams ad-libbed, "We're going to miss you, Wayne Gretzky". "
The Star-Spangled Banner", as sung by John Amirante, was altered to include the words "in the land of Wayne Gretzky".
Gretzky ended his career with a final point, assisting on the lone New York goal scored by Brian Leetch.
At the time of his retirement, Gretzky was the second-to-last WHA player still active in professional hockey.
Mark Messier, who attended the game along with other representatives of the Edmonton Oilers' dynasty, was the last.


Gretzky told journalist Scott Morrison that the final game of his career was his greatest day.
He recounted: 
My last game in New York was my greatest day in hockey...Everything you enjoy about the sport of hockey as a kid, driving to practice with mom [Phyllis] and dad [Walter], driving to the game with mom and dad, looking in the stands and seeing your mom and dad and your friends, that all came together in that last game in New York.
Gretzky ended his professional playing career with the New York Rangers, where he played his final three seasons and helped the team reach the Eastern Conference Finals in 1997. The Rangers were defeated in the Conference Finals in five games by the Philadelphia Flyers, despite Gretzky leading the Rangers in the playoffs with 10 goals and 10 assists. For the first time in his NHL career, Gretzky was not named captain, although he briefly wore the captain's "C" in 1998 when captain Brian Leetch was injured and out of the line-up. After the 1996–97 season, Mark Messier signed a free agent contract with the Vancouver Canucks, ending the brief reunion of Messier and Gretzky after just one season. The Rangers did not return to the playoffs until 2006, well after Gretzky retired. Along with Jaromir Jagr, he topped the NHL in 1997–98 with 67 assists. It was the 16th time in 19 seasons that Gretzky earned at least a share of the league lead in the statistic.
In 1997, prior to his retirement, The Hockey News named a committee of 50 hockey experts (former NHL players, past and present writers, broadcasters, coaches and hockey executives) to select and rank the 50 greatest players in NHL history. The experts voted Gretzky number one. Gretzky said he would have voted Bobby Orr or Gordie Howe as the best of all time.
The 1998–99 season was his last as a professional player. He reached one milestone in this last season, breaking the professional total (regular season and playoffs) goal-scoring record of 1,071, which had been held by Gordie Howe. Gretzky was having difficulty scoring this season and finished with only nine goals, contributing to this being the only season in which he failed to average at least a point per game, but his last goal brought his scoring total for his combined NHL/WHA career to 1,072, one more than Howe. As the season wound down, there was media speculation that Gretzky would retire, but he refused to announce his retirement. His last NHL game in Canada was on April 15, 1999, a 2–2 tie with the Ottawa Senators and the Rangers' second-to-last game of the season. Following the contest, in a departure from the usual three stars announcement, Gretzky was awarded all three stars. Upon returning to New York, Gretzky announced he would retire after the Rangers' last game of the season.
The final game of Gretzky's career was a 2–1 overtime loss to the Pittsburgh Penguins on April 18, 1999, in Madison Square Garden. Although the game involved two American teams, both national anthems were played, with the lyrics slightly adjusted to accommodate Gretzky's departure. In place of the lyrics "O Canada, we stand on guard for thee", Bryan Adams ad-libbed, "We're going to miss you, Wayne Gretzky". "The Star-Spangled Banner", as sung by John Amirante, was altered to include the words "in the land of Wayne Gretzky". Gretzky ended his career with a final point, assisting on the lone New York goal scored by Brian Leetch. At the time of his retirement, Gretzky was the second-to-last WHA player still active in professional hockey. Mark Messier, who attended the game along with other representatives of the Edmonton Oilers' dynasty, was the last.

Gretzky told journalist Scott Morrison that the final game of his career was his greatest day. He recounted: 
My last game in New York was my greatest day in hockey...Everything you enjoy about the sport of hockey as a kid, driving to practice with mom [Phyllis] and dad [Walter], driving to the game with mom and dad, looking in the stands and seeing your mom and dad and your friends, that all came together in that last game in New York.
Wayne Gretzky