The Mets said the 33-year-old Cespedes had the operation on Thursday.
The team announced Monday that the oft-injured outfielder had broken his right ankle in an accident on his ranch.
Cespedes hadn't played this season while recovering from surgery on both heels. The two-time All-Star played just 38 games last year.
Mets general manager Brodie Van Wagenen said this week the team was told Saturday night that Cespedes sustained multiple ankle fractures on his ranch in Port St. Lucie, Florida, where the club's spring training complex is located.