Former world No.3 Del Potro fractured his right patella during a first-round win over Denis Shapovalov at the Queen's Club Championships this week.
The blow marked the latest injury setback for the Argentinean, who damaged the same knee last October and only returned to the ATP Tour in May.
But the 30-year-old, the 2009 US Open champion, is staying positive after his operation.
"Surgery went well. Now entering rehab mode," Del Potro wrote on Twitter from his hospital bed. "Thanks for your support, I really appreciate it!"
Del Potro's career has been marked by a succession of serious injuries, the right-hander undergoing multiple wrist surgeries before battling back to reach his career best ranking last year.