Having the surgery, which happened in London on Monday, means he might not be fit to take part at Wimbledon this summer, where he had planned to say goodbye to the sport.
In an emotional news conference in Melbourne before the Australian Open, Murray said he would retire this year, preferably after Wimbledon.
The two-time Wimbledon victor shared a picture of his x-ray after he went under the knife for hip surgery in a bid to prolong his tennis career and improve his quality of life.
Andy Murray did have a second hip operation, after all, getting a metal implant one year after his first procedure on the joint.
Murray has been suffering from severe hip pain for years, limiting his mobility and causing him to limp at times even as he continued to play at a highly competitive level.
"I now have a metal hip as you can see in the 2nd photo and I look like I've got a bit of a gut in photo 1". But that did not solve the problem.
Murray previously told tennis fans that he was likely to retire after Wimbledon, but noted that he might decide to give surgery a try rather than simply play through the pain in an attempt to compete in one more tournament.
"The reason for having an operation like that [hip resurfacing] is not to return to professional sports, you know, it's just for a better quality of life", he said at the time.
He was set for a farewell six months after emotionally announcing he was in too much pain to carry on in the build-up to the first grand slam of the year.
The 31-year-old had previously said ahead of the Australian Open earlier this month that he meant to retire after this year's Wimbledon.
"He's been watching me like a hawk, asking me how I'm feeling after matches, after practices, where I'm at".
Another said: "Hey Andy Murray X-rays don't just show bones my friend". "I'm just trying to be supportive". Those guys are really sliding around, killing themselves for four hours.