The former Chelsea, Real Madrid and Arsenal midfielder, who joined PSG in January last year had his 22 months deal cancelled by the French champions after failing to live up to the billing.
READ MORE: Watch Ghanaian youngster Callum Hudson-Odoi’s beauty for Chelsea
Diarra, 33 made only three league appearances this season under German boss Thomas Tuchel and said on Instagram it was time to 'hang up his boots'
"For football, I gave a lot. Thanks to football, I received a lot. I did not do everything perfectly but I did it with heart, passion and kindness,' Diarra added.
"Thank you to all those who have encouraged me throughout my sporting career. I turn the page but I forget nothing.
"I will continue to work with enthusiasm, determination and sincerity in my new projects.'
Diarra, who played 34 times for France, joined Chelsea from Le Havre in 2005 and won the Premier League title with them before moving to London rivals Arsenal two years later.
He lasted only five months with the Gunners, however, and moved to Portsmouth, where he won the FA Cup in 2008.
Diarra switched to Real Madrid in 2009, where he won the league and cup, and also had spells in Russia and the United Arab Emirates.