McGregor made the announcement on Twitter following UFC 250 in Las Vegas on Saturday, however, it is not the first time the Irishman has called it quits.
Former UFC featherweight and lightweight champion McGregor said he was retiring in March 2019 after losing to Khabib Nurmagomedov at UFC 229 in October 2018, while he also did the same in 2016.
But McGregor returned to the octagon with a devastating first-round TKO of Donald Cerrone at UFC 246 in January.
UFC president Dana White recently said he had not talked to McGregor about his next fight amid the coronavirus pandemic as the 31-year-old eyed a bout.
But after Amanda Nunes and Cody Garbrandt celebrated wins, McGregor wrote: "Hey guys I’ve decided to retire from fighting.
"Thank you all for the amazing memories! What a ride it’s been! Here is a picture of myself and my mother in Las Vegas post one of my World title wins!
"Pick the home of your dreams Mags I love you! Whatever you desire it's yours."
McGregor – who last month said he had accepted a proposal to fight against Anderson Silva – has earned a 22-4 record in mixed martial arts, with just two losses in the UFC.
He also stepped into the boxing ring to fight unbeaten American legend Floyd Mayweather Jr, losing in 2017.
Asked about McGregor on Saturday, White told reporters: "Nobody is pressuring anybody to fight. And if Conor McGregor feels he wants to retire, you know my feelings about retirement -- you should absolutely do it. And I love Conor...there's a handful of people that have made this really fun for me. And he's one of them."
White added: "If that's what Conor is feeling right now -- Jon Jones, Jorge Masvidal, I feel you. It's not like I'm going, 'Holy s***, this is crazy, this is nuts.'
"Nothing is crazy and nuts right now, because everything is crazy and nuts right now, on a certain level. I totally understand it and get it."