SHANGHAI -- It took a successful complex hip resurfacing operation to return Andy Murray to a pain-free existence with the possibility of restoring his tennis career.

Interestingly, it was only with that occurrence the three-time Grand Slam champion -- and former world No. 1 -- understood he didn't need to play tennis to enjoy personal fulfillment.

"A few months after the operation when my pain was gone, I wasn't playing tennis still, but I was really, really the happiest I have been in a very long time," Murray said at the Shanghai Masters on Sunday. "I realized then that the priority for me was my health and being pain-free.

"Yes, tennis is an important part of my life but it's not. Without it, I'll be fine, which maybe I didn't know beforehand," he added. "I didn't know at that point if I definitely wanted to come back and play because [I felt] I'm really happy right now, and I don't need it."

Life, in general, has definitely become more gratifying for Murray since his right hip became semi-bionic in late January.

Even before he started swinging a tennis racket again, he rekindled an interest in golf and started socializing more because he could go out for dinner to no longer find "your hip is aching and throbbing, and at times it's very hard to concentrate."

Also during his time away from the game, he discovered an appreciation of art -- although he laughingly admits it took only about 20 minutes of attempting to paint to realize he's no budding Picasso. He quickly determined he'd leave the actual art creation to those with talent and lavish in being a keen observer.

All that self-growth was great, but the unspoken, unanswered question of whether he would try to play again always hung in the air.

His pre-surgery stance: "I think the 18 months before I had the operation I wasn't enjoying tennis. I wasn't getting anything out of the competing or the training because it was just really uncomfortable. I wasn't watching tennis anymore even if it was a Grand Slam final. I wasn't really paying attention, which is a shame as well because it's something I really care a lot about."

His post-surgery stance: "What did I miss? I've always enjoyed pretty much everything about the tour. I like traveling and I like going to see different cities. I like being around the locker room, chatting with the other players and competing and practicing. Maybe one thing I really missed, the structure. For most of my life since I was 14, 15 you kind of pretty much know what you're going to do ahead of time. Whereas when you're injured -- or not playing tennis -- you don't really know what you're doing in three days' time or four days' time, or where you're going to be in a couple of months' time."

The final decision for Murray was to give it a go. The only downside would be going from being a full-time husband and dad of two to occasionally being an absentee member of the family.

Slowly but surely, and without much concern regarding results, Murray dangled his career a lifeline. In recent weeks in China, after doing well at a Challenger event at Rafael Nadal's Mallorca Academy, his results started to step up. He won his first post-surgery, tour-level singles match at Zhuhai two weeks ago, and then advanced to the Beijing quarterfinals last week.

"Physically I feel good," he said. "I have no pain in my hip anymore so that's great. My body is still kind of adjusting to playing a few matches in a week, which I guess is normal since I haven't really done that for over a year."

On Monday, the comeback continues at the Shanghai Masters, where he'll play Argentine qualifier Juan Ignacio Londero. His goal for this Asia swing was simple: try to play six matches, which would prove he could be competitive again.

"I love seeing Andy back. I feel also he's playing better and better, which is going to be great," Roger Federer told ESPN on Sunday.

A five-set, first-round Australian Open defeat left Andy Murray emotionally frazzled and convinced that he couldn't continue to perform with the pain in his hip. GREG WOOD/AFP/Getty Images

What the future holds is not known, but it's easy to see that the difference between where he's at now and 10 months ago at the Australian Open is stark.

Murray arrived in Melbourne after being sidelined for 11 months. He admits he publicly pushed the notion that everything was fine, but privately had told those closest to him his career end could be closing in.

"For 18 months, [retiring] was something I obviously thought a lot about and considered multiple times and spoken to my family about, my team about," he said. "It was actually in December [2018] that I had decided I wanted to stop for sure. I didn't know how I was going to deal with that because since I'd been a kid this is what I've done. So I was like, 'Life without tennis, what would that look like?' "

A five-set, first-round Australian Open defeat to Spaniard Roberto Bautista Agut left Murray emotionally frazzled and frustrated, and firmer in his conviction that in his current shape he couldn't continue to perform. While he never actually said his career was over, the signal he sent out suggested he could've just played his final match.

Get the best of ESPN sent to your inbox The ESPN Daily delivers the biggest sports news and moments every weekday. Sign me up! Email:

Even the Australian Open honchos had taken his cues to heart and went about preparing a goodbye and well-wishes video. Murray sat in his courtside chair, teary-eyed, as he watched along with the crowd the many messages tennis colleagues and friends recorded.

"I asked him, 'What's up? Is that it? Are you going? Sorry to ask you, but I kind of want to know and I think the people want to know.' He's, like, 'I don't know,' " Federer recalled.

Days later, Murray returned home well aware the hip resurfacing operation was inevitable -- he had to try anything to improve the quality of his life. He did his homework carefully, even going so far as to watch a graphic video of a hip resurfacing operation.

"I couldn't walk from here to the lunch hall without being in a lot of pain," he said. "I couldn't sleep without being woken up by the pain in my hip.

"The good thing about when I watched [the video] was I really saw this is a major surgery. Things can go wrong, this is not always very successful. It was important for me to watch that because when you're younger you think you're gonna be fine."

Now with the surgery -- and the unbearable pain -- a thing of the past, Murray is all about positivity. He's happily taking the tennis ride again just because he can.

"It's been absolutely great," Murray said. "There's been no setbacks. The operation -- I'm sure many more athletes and people will have this operation in the future and be like, 'Why weren't we doing this like 10 years ago?'

"I wish I'd have had the operation sooner now that I know how it feels."