Rafael Nadal beside injured Alexander Zverev (AFP)
The German world number three turned his ankle while trailing eventual champion Rafael Nadal in the last four in Paris last week, screaming in pain before retiring from the match.
The 25-year-old did not say when he will be back on court, but looks certain to miss Wimbledon which begins on June 27. The US Open starts on August 29.
"We all have our own journey in life. This is part of mine," Zverev wrote to his 1.8 million followers on Instagram late Tuesday alongside a picture of him giving a thumbs-up from a hospital bed.
"Next week I'll reach a career-high ranking of number two in the world, but this morning I had to undergo surgery.
"After further examination in Germany, we received confirmation that all three of the lateral ligaments in my right ankle were torn.
"To return to competition as quickly as possible, to ensure all the ligaments heal properly, and to reclaim full stability in my ankle, surgery was the best choice."
Zverev is still waiting for a maiden Grand Slam title, despite winning five Masters trophies and the ATP Finals twice.
Roland Garros last week was his fifth major semi-final. He lost the 2020 US Open final to Dominic Thiem, having led by two sets.
"My rehab starts now and I'll do everything to come back stronger than ever!" he added.
(For more sports news and updates, follow Ahram Online Sports on Twitter at @AO_Sports and on Facebook at AhramOnlineSports.)