The two-time Wimbledon winner had been weighing up the procedure - which sees a metal plate inserted into the joint - in a final attempt to prolong his career.
The 31-year-old had said ahead of the Australian Open earlier this month that he was planning on retiring after this year’s Wimbledon tournament.
Writing on social media, Murray confirmed he had undergone the procedure, adding: “I underwent a hip resurfacing surgery in London yesterday morning.
“Feeling a bit battered and bruised just now but hopefully that will be the end of my hip pain. I now have a metal hip.”
Murray posted an X-ray image showing his pelvic area, with the metal insert clearly visible.
While the procedure will allow the former World No.1 to live a pain-free life, it doesn’t guarantee he will be able to make a playing comeback.
However there is cause for optimism - former world No. 1 doubles player Bob Bryan underwent the same operation in August last year, and made a return to the practice court just four months later.
Earlier this month Bryan and his twin brother Mike were back on tour, suggesting that Murray could be harbouring hopes of a Wimbledon appearance if all goes well.
Speaking in the aftermath of his Australian Open loss to Spaniard Roberto Bautista Agut, Murray said: “I have basically two options. One is to take the next four and a half months off, then build up and play Wimbledon.
“I can’t walk properly at all just now. I could play another match, but I want to improve my quality of life because, even if I take four months [off], I still can’t walk.
“Having an operation like that, there’s absolutely no guarantees I’d be able to play again. I’m fully aware of that.
“It’s a really big operation. But there is the possibility, because guys have done it before. Bob Bryan is doing it just now. Some other athletes have given it a go.
“But, like I said, there’s no guarantees. That’s kind of the decision I have to make, that possibility of not having one more match by having the operation.”