The 38-year-old, who has been without a club for nine months following a stint with Brazilian side Vasco da Gama, made the announcement during an emotional live interview at half-time of the Ligue 1 match between hosts Marseille and Lille at the Stade Velodrome.
Payet struggled to contain his tears as he confirmed the decision at the home of the club where he enjoyed his most successful years across two separate spells.
The Reunion-born player began his professional career at FC Nantes in 2005. He went on to earn 38 caps for France, scoring eight goals, and was a prominent member of the squad that reached the final of the European Championship in 2016, where they were defeated 1-0 by Portugal after extra time.
"I want to take two minutes to thank everybody - to thank all those who shared these 20 years with me. It was something exceptional," he said.
"I come from an island and my dream was to become a professional. I made it and did it for 20 years at the highest level. I managed to play for the national squad, and today is the end of a beautiful journey."
Despite a career without a major trophy, Payet established himself as a premier set-piece specialist at both Marseille and Premier League side West Ham United.
