Roberto Carlos, who joined the cash-rich Russian club in 2011, has not featured in any game after being withdrawn from the squad in March. However, the 2002 World Cup winner will take up an ambassador's role to develop football in the region.
"Roberto had been a world class player and it's sad that we're not going to see him play again," Anzhi coach Guus Hiddink said. "Thankfully Roberto has agreed to take on a role with the club to help develop football in the region and throughout Russia."
Roberto won 125 caps for Brazil and represented the national team at the 1998, 2002 and 2006 FIFA World Cups. He spent 11 seasons with former club Real Madrid and said he is planning a farewell game against the La Liga champions.
"We had met Real president Florentino Perez and discussed such a match between Real and Anzhi," Roberto Carlos was quoted as saying in The Guardian.
"We need to set up a date that suits both clubs. I would like to have my farewell to be played in Makhachkala."
Known for his trademark free-kicks, long throws and speed, the Brazilian won three Champions League titles and four La Liga championships with Real Madrid.
After playing for over a decade in the Spanish capital, Roberto Carlos moved to Turkey with Fenerbance in 2007. The left-back finally decided to play back in his country after spending nearly 15 years in Europe. He joined Corinthians in 2010 where he was reunited with friend and former Real teammate Ronaldo.
Roberto Carlos later joined wealthy Russian outfit Anzhi Makhachkala and made 28 appearances scoring four goals during the Russian Premier League season. The Brazilian was also made caretaker manager in Sept 2011. However, the 39-year-old legend announced his plans to retire at the end of 2012 but had accepted to take up the role of technical director.