In comments posted on the team’s website, Palmeiras director Cesar Sampaio says the 38-year-old player announced his decision on Wednesday.
Marcos helped his team win four state championships, two national championships, and the 1999 Copa Libertadores tournament.
He was also on the national team that won the 2002 World Cup, the Confederations Cup in 2005 and the Copa America in 1999.
Palmeiras has said that it will organize a farewell game in Marcos’ honor. The date and opponent will be announced later.