The Irishman, who finishes with 21-4 record, said on his Twitter account on Tuesday morning that he had decided to call it a day and wished his former colleagues well.
McGregor, 30, returned to the octagon last October after a hiatus of nearly two years where he fought Khabib Nurmagomedov for the lightweight strap.
The Russian retained his UFC lightweight title when he beat McGregor with a fourth-round submission but the event was marred by a post-fight brawl which led to both fighters being fined and suspended.
McGregor posted on Twitter: “Hey guys quick announcement, I’ve decided to retire from the sport formally known as “Mixed Martial Art” today.
“I wish all my old colleagues well going forward in competition. I now join my former partners on this venture, already in retirement.
“Proper Pina Coladas on me fellas!”
McGregor quickly became one of UFC’s biggest stars, winning performance of the night four times in succession after defeating Diego Brandao, Dustin Poirier, Dennis Siver and Chad Mendes to become the interim featherweight champion.
His next bout at UFC 194 saw him take the undisputed featherweight title with a knockout of Jose Aldo inside 13 seconds.
A loss to Nate Diaz at UFC 196 in his welterweight debut was his first in UFC and halted a 15-fight winning streak but the Irishman won a rematch five months later.
A win over Eddie Alvarez for the lightweight championship saw McGregor become the sport’s first dual-weight champion.
After the success at UFC 205, McGregor opted to take time away from MMA and it was during that hiatus that he took on Floyd Mayweather in his first professional boxing match.
‘The Money Fight’ was a lucrative affair - with more than a million pay per view buyers in the UK and four million in the United States, with the American defeating his opponent in the 10th round by TKO.
In recent years, McGregor has become known for incidents outside the octagon almost as much as his activities on fight nights.
He was arrested and charged with robbery earlier this month after allegedly stamping on a mobile phone belonging to a fan in Miami
That altercation came after McGregor had a brush with the law in the US over a violent incident at a UFC event in April, 2018.
Several people were hurt when he hurled a trolley at a bus, smashing a window, as it left the Barclays Centre in Brooklyn.
Fighters Michael Chiesa and Ray Borg were injured by shattered glass and unable to compete.
McGregor’s post on Tuesday morning is not the first time the Dublin-born fighter has spoken of calling it a day.
In a 2016 post, he wrote: “I have decided to retire young. Thanks for the cheese. Catch ya’s later.”
McGregor also said during an appearance on The Tonight Show with Jimmy Fallon on Monday that he was in discussions to fight this summer.
“We’re in talks for July,” McGregor told Fallon in quotes reported by MMA Fighting. “So we’ll see what happens. A lot of politics going on. The fight game is a mad game. But again, like I said, and to my fans, I am in shape and I am ready.”
However, he admitted that he did not need to fight from a financial standpoint as he promoted his brand of whiskey.
“I’ve done a lot, I’ve fought a lot,” McGregor added. “I’ve never pulled out of contests. I’ve gone through some crazy injuries, some crazy external situations that many a man would sprint for the hills if it happened to them.
“But I stood firm, (I’ve) done my piece for the company....Like I said, this whiskey is my baby. I have a lot of great entities. I don’t necessarily need to fight.
“I am set for life, my family is set for life. We are good. But I am eager to fight. So, we will see what happens. I’m just staying ready, as I like to say.”