Baines made the revelation following Everton’s 3-1 home defeat to relegated Bournemouth on the final day of the 2019/2020 Premier League season on Sunday.
Baines appeared for the final 20 minutes at Goodison Park in what was his eighth league game of the season.
The former England international joined Everton from Wigan Athletic in the summer of 2007 and has gone on to make 420 appearances in total for the Toffees, scoring 39 goals.
In a farewell letter to Everton supporters on the club's website, Baines said: "I am incredibly proud to have represented Everton for the past 13 years and my decision to retire has been a difficult one to make.
"After speaking to my family, I feel now is the right time to end my playing career but I do so with many great memories at this proud football club.
"As someone from the city, Everton means so much to me and it has been an honour to be part of the club for so long.
"I would like to thank everyone who has supported me during my time at Everton, especially the fans who have been fantastic with me from the moment I signed."
Everton, who offered Baines a one-year contract extension, are keen to retain his services in another capacity.
"Leighton has taken the decision to stop playing," said manager Carlo Ancelotti. "I think every Evertonian has to be grateful to him.
"We would like to keep him in the Club because his knowledge is very important. It's his decision."
Baines won 30 caps for the England national team and was part of their squads at the 2012 European Championship and 2014 FIFA World Cup.