The 35-year-old defenceman agreed to terms of a US$17.25-million, three-year contract extension with the Montreal Canadiens on Monday. Markov was due to become an unrestricted free agent on July 1.
He said on a conference call that signing a new deal with Montreal was his "first priority.
"I knew before the season was over I'd like to stay with the Montreal Canadiens, so I'm happy the deal was done and I'm looking forward now. I feel like I'm at home here. I feel comfortable. I'd like to stay for the rest of my career. I've never known (free agency), but it doesn't matter. I'm happy with that deal."
Markov will earn the same salary, $5.75 million per season, that he made in each of his last two contracts over the past seven years.
As a player 35 or over, he is guaranteed the full amount of his new deal.
"We are very happy to have secured a long term agreement with Andrei," general manager Marc Bergevin said in a statement. "He is an important part of our group of core players.
"He is healthy, shows a very good work ethic and has great leadership skills. He plays big minutes against the top opponents, and game-changing defencemen of his calibre are hard to find."
Markov will be 38 when the deal expires after the 2016-17 season, but feels it is too early to say if it will be his last contract.
There were fears that his career was over when a succession of knee injuries limited him to only 65 games over three years from 2009-10 to 20011-12, but he played all 48 games of the lockout-shortened 2012-13 campaign and missed only one regular season game this season.
He had seven goals and 36 assists and was plus-12 this season, while getting a team-high 25:14 of ice time per game. He added a goal and nine assists in 17 playoff games as the Canadiens reached the Eastern Conference final. He also played for Russia at the Sochi Olympics.
While he has slowed in a recent years, the Voskresensk, Russia native combines a solid defensive game with first-rate passing and playmaking skills from the point on power plays.
"It wasn't easy when I had injuries, but I always stayed positive," Markov said. "The last two years I felt good. My health is good. I enjoy the game like I used to. I'm looking forward to next season."
Markov holds Russian and Canadian citizenship, having become a Canadian citizen in 2010.
He was drafted in the sixth round, 162nd overall, by Montreal in 1998. He made his NHL debut in 2000.
In 765 regular season games, he has 98 goals and 344 assists. His best seasons were 2007-08, when he had 16 goals and 58 points and 2008-09, when he had 12 goals and 64 points.
He was the team's second potential free agent to sign ahead of July 1. Last week, forward Dale Weise inked a two-year contract that pays $1.025 million per season.
Bergevin now faces negotiations with potential restricted free agents P.K. Subban and Lars Eller, while potential UFAs include captain Brian Gionta and defenceman Mike Weaver.