The 28-year-old called time on his 2014 season last month after confirming that he needed an operation.
Nadal has now left hospital as he bids to recover and return to full fitness in time for the start of the 2015 season.
Nadal posted the picture above on Facebook and wrote: “Everything went great. Thank you very much for your support. Big hug!”
He added to reporters as he left the hospital on Wednesday: “Everything went well. It was simple, ordinary surgery,”
Nadal, who will miss next week’s ATP World Tour Finals, is planning to return at the World Tennis Championship exhibition event in Abu Dhabi from 1 to 3 January 2015.
MORE: The latest football news
MORE: The latest tennis news