The ex-Liverpool defender announced his decision to leave the BBC football highlights and analysis show following 22 years with the broadcasters.
Lineker wrote on Twitter: "Alan Hansen has announced he will retire at the end of the season. It has been an absolute pleasure to work with him. Wish him well.
"In my opinion, as a television football pundit, Alan Hansen has been for two decades consistently the best. Opinionated, knowledgeable, tactically superb."
Hansen will leave the show for good after the 2014 World Cup in Brazil.