Murray's final tournament ended in the quarter-finals at Roland-Garros as he and Dan Evans were beaten in straight sets by American duo Tommy Paul and Taylor Fritz.
The 37-year-old left Court Suzanne-Lenglen to a standing ovation as the curtain came down on a career that included three Grand Slam titles, as well as singles gold at both the London and Rio Games.
"I feel good. I have been ready for this moment for the last few months since I had the operation on my back," said Murray.
"I knew it was the right time and I feel lucky to come and compete here.
"I am grateful to Dan (Evans) for putting in the effort he did to give us a good chance of having a great run. I am looking forward to stopping now."
While Murray and Evans had pulled off miraculous comebacks against Japan’s Kei Nishikori and Taro Daniel and Belgium's Sander Gille and Joran Vliegen in the previous rounds, both Paul and Fritz proved to be a step too far.
The British pair were second best for much of the contest, despite showing signs of yet another comeback in the second set only for Fritz's strong service game to cinch victory for the Americans.
"I mean it was a great run and we lost to two top players today. They are both top tennis players, we would have had to play very well to win that match and we didn’t.
"We got into it at the end, but if we found that form earlier we could have caused them problems, but it wasn't to be.
"We did make the quarters, but if you get through that match you get an opportunity to win a medal."
Murray bows out having won 739 of his 1001 ATP Tour level matches, earning 46 singles titles across his career as well as spending 41 weeks as world number one.
But in true Murray fashion, he posted to X joking he never liked the sport he played for 18 years shortly after the defeat.
The British duo saved match points again to emerge victorious in a gripping tie-break, prevailing 6-3 6-7 (10-8) 11-9 at Roland-Garros.
Murray and Evans flew out the blocks in the opening exchanges, racing into a three-game lead early on before seeing out the first set in comfortable fashion.
But their Belgian opponents fought back strongly in the second set and looked in a strong position to level the match, only for Evans' individual close-net brilliance to level the set.
For the second match in a row, Murray’s career hinged on a first-to-10-point match tie-break, with the British duo showing their powers of recovery once more after saving two match points.
After missing two match points in the second-set tie-break, the Team GB duo would make no mistake this time around as Evans completed another miracle escape with a volley at the net that left Murray in tears shortly after.
They will take on either American third seeds Tommy Paul and Taylor Fritz or Dutch duo Robin Haase and Jean-Julien Rojer in the next round.
Data Debrief: Murray's farewell tour continues
In yet another enthralling match involving Murray and Evans, the pairs resilience once again shone through at Roland-Garros to keep the Scot's hopes of a third gold medal alive.
The pair saved all three of the break points they faced, but were also equally impressive on serve as they won 57 of their 79 first serve points.
The two-time gold medallist looked set to be playing his final game, but Team GB prevailed 2-6 7-6 (7-5) 11-9 on Court Suzanne Lenglen.
Nishikori and Daniels, who were both eliminated from the men's singles competition earlier in the day, were keen to make amends and broke the British pair twice in the last four games of the opening set to draw first blood.
Murray and Evans responded well and replied to two breaks in the second set to force a tie-break, in which they held their nerve to level.
In the final set decider, the curtain looked sure to come down on Murray's glittering career, but the Brits survived five match points to level the tie-break at 9-9 before remarkably booking their place in the next round.
Data Debrief: From the jaws of defeat
Nishikori and Daniels could not have asked for a better first set as they brushed their opponents aside, making just four unforced errors to Team GB's 10.
However, Murray and Evans' resilience kicked in, and they saved two break points in the second set. In the decider, they won the last seven points to storm through, leaving their opponents shocked.
In an already memorable tournament for Murray, he has just played a match that will live long in the memory.
Having endured a difficult few years due to injuries, Murray confirmed earlier this week that he will retire from tennis after the Games in the French capital.
Murray – who won singles gold at both London 2012 and Rio 2016 – was due to play both singles and doubles, teaming up with Dan Evans for the latter tournament.
However, he announced he had withdrawn from the singles ahead of the draws behind made on Thursday.
"I have taken the decision to withdraw from the singles to focus on the doubles with Dan Evans," said a statement issued by Murray.
"Practice has been great and we're playing well together. I'm really looking forward to getting started and representing Team GB one more time."
Murray also withdrew from the singles at his final Wimbledon tournament earlier this month, with his final match on Centre Court being a first-round doubles defeat alongside brother Jamie.
Murray and Evans face stern competition in the doubles at Roland-Garros, with Spanish duo Carlos Alcaraz and Rafael Nadal forming a heavyweight partnership at the venue where the latter has won 14 French Open singles titles.
The two-time gold medallist had twice come from the jaws of defeat at the tournament, but there was to be no miracle this time as they were beaten 6-2 6-4 in the quarter-finals.
Murray and Evans endured a nightmare start to proceedings, conceding a double break to their American opponents which proved to be decisive in deciding the opening set.
Despite a better start in the second, Paul and Fritz would again stamp their authority on the encounter, racing into a 5-2 lead and to within a game of victory.
But as shown in the previous rounds, Murray and Evans showcased grit and determination to claw themselves to within a game of levelling the contest after saving one match point in the eighth game.
However, Fritz's strong serving would come to the fore as it had done throughout the contest on Court Suzanne Lenglen, making no mistake to wrap up the victory.
Paul and Fritz will face Matthew Ebden and John Peers for a place in the final, potentially setting up an all-American clash with Austin Krajicek and Rajeev Ram.
Data Debrief: Murray's farewell ends in disappointment
There was to be no comeback from Murray and Evans this time around, as tennis says goodbye to one of its greatest ever players.
But the encounter belonged to the Americans, whose performances on serve proved to be the difference at Roland-Garros.
Fritz and Paul would win 63% of their 40 first serve points, winning seven service games compared to the Brits' four.