Xavi: I almost joined Bayern Munich
Since making his debut for the club in 1998, the Spain international has been an integral part of Barca's success, winning seven La Liga titles during his time at the Camp Nou.
However, he almost made the move to Munich in 2008 before Barca coach Pep Guardiola - who is now in charge at Bayern - convinced him to remain with the club.
"They were quite serious. There was even a meeting with a coach of Bayern and (FIFA agent Giovanni) Branchini," Xavi told Mundo Deportivo.
"Pep took me and told me that I could not go, that the Barca he had in mind revolved around certain players, including myself.
"It was another good decision because my desire is to retire at Barca."
As well as regular league titles, Xavi has won three UEFA Champions League crowns and the Copa del Rey twice.
Xavi is keen to retire at Barca, amid reports of interest from MLS outfit New York Red Bulls.
"My only objective now is to retire at Barca, although I'm aware it could be difficult because of the high level required," he added.
"Linked with New York teams? I didn't get any offer, (Red Bulls striker and former Barca team-mate Thierry) Henry didn't call me. All I know about New York is that it's cold there now."
Xavi is in line to make his 700th Barca appearance against Getafe in the Copa del Rey on Thursday.