The 34-year-old guided the Spanish national team to three successive major trophies as La Roja triumphed at Euro 2008, the 2010 World Cup and Euro 2012. He will continue to compete in club football for the foreseeable future with Barcelona.
"I think my time there (for Spain) has finished," Xavi said in a press conference on Tuesday. "I am happy to enter a new stage at Barca. I think that at the end of the season we will achieve things."
Xavi amassed 133 caps, the most for an outfield player on the Spanish national team. Goalkeeper Iker Casillas leads the nation with 156 international appearances.