After his contract ended at the season's close, Los Blancos had arranged a short-term extension for him to participate in the Club World Cup, which took place this summer in the United States.
"Vazquez exemplifies the principles of Real Madrid, making him one of the most cherished players among our supporters," stated Madrid president Florentino Perez in a statement.
"(He) embodies the dedication, resilience, modesty, and competitive spirit necessary for success in this jersey."
Initially a winger, the 34-year-old secured 23 trophies with the club, including five Champions League titles and four La Liga championships, primarily as a squad member.
"I am leaving Real Madrid, but Real Madrid will always be a part of me," Vazquez expressed in a farewell video.
The Spaniard progressed through the Madrid youth academy and spent his entire career at the club, except for a loan to Espanyol during the 2014-15 season, making 402 appearances for Los Blancos.