The two-time Wimbledon champion was debating having the procedure, which involves putting a metal plate into the joint, in a final bid to prolong his career.
The 31-year-old had previously said ahead of the Australian Open earlier this month that he intended to retire after this year’s Wimbledon.
Murray said on Instagram: “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.”
The operation does not guarantee the Scot will be able to make a comeback, but will allow him to live a pain-free life.
Murray 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.
But after a monumental five-set tussle with Roberto Bautista-Agut, where Murray showed he still has the ability and desire to compete at the top level, he said he would do everything he could to keep playing.
Having the surgery, which happened in London on Monday, means he might not be fit to take part at SW19 this summer, where he had planned to say goodbye to the sport.
And if it does not allow him to return to the court, he will have played the last game of his glittering career.
In the lead up to his operation, he was in constant dialogue with American doubles specialist Bob Bryan, who has just returned to the game following the same procedure last summer.
It is the second round of surgery on the troublesome joint, 12 months after the first one, which did not solve the issue.