Ireland's former two-weight UFC champion, 31, has a record of 22 wins and four defeats.
His last fight, in January 2020, saw him beat American fan favourite Donald 'Cowboy' Cerrone in just 40 seconds in Las Vegas.
He has previously announced his retirement in 2016 and 2019 before twice returning to the octagon.
McGregor also tried boxing, losing to former five-weight world champion Floyd Mayweather in August 2017.
"Hey guys I've decided to retire from fighting," he said on Twitter on Sunday.
"Thank you all for the amazing memories! What a ride it's been!"
He later told ESPN he was "bored of the game".
McGregor added: "The game just does not excite me, and that's that. All this waiting around. There's nothing happening.
"I'm going through opponent options, and there's nothing really there at the minute. There's nothing that's exciting me."
Speaking after UFC 250 in Las Vegas on Saturday, the organisation's president Dana White said he had not been given advance warning of McGregor's announcement.
More about: ConorMcGregor UFC