"Floyd Mayweather, don't ever bring race into my success again," McGregor said in an Instagram post.
"I am an Irishman. My people have been oppressed our entire existence. And still very much are. I understand the feeling of prejudice. It is a feeling that is deep in my blood.
"In my family's long history of warfare there was a time where just having the name 'McGregor' was punishable by death."
In an interview with the website Fight Hype, Mayweather said he believes "racism still exists in the sport of boxing," while also bringing UFC stars McGregor and Ronda Rousey into the conversation.
Mayweather wondered why he is questioned about his behavior and McGregor isn't.
"And what's so crazy, I don't really know the McGregor guy; never seen him fight," Mayweather said. "I heard his name actually from one of the runners that works for our company. ... He told me about the guy McGregor. They say he talk a lot of trash and people praise him for it, but when I did it, they say I'm cocky and arrogant. So biased! Like I said before, all I'm saying is this, I ain't racist at all, but I'm telling you racism still exists."
In addressing Mayweather, McGregor said, "Do not ever put me in a bracket like this again."
He also challenged Mayweather to a bout, saying, "I will give you a fair 80/20 split purse in my favour seen as your last fight bombed at every area of revenue."
"At 27 years of age I now hold the key to this game," McGregor said. "The game answers to me now."
McGregor also apologized after an Instagram photo that appeared to show him holding a gun and pointing it at the camera caused a media flurry. Irish police said they were investigating, but McGregor said it was only an airsoft gun.
"I apologise for having the air-soft in public," he said. "I was simply rehearsing for a potential upcoming film role."
McGregor (19-2) will next fight in a UFC 197 headliner March 5, sources have told ESPN. He will move up in weight to challenge lightweight champion Rafael dos Anjos for the 155-pound title. The UFC has not announced the fight, and sources say bout agreements have not yet been signed.
"What can I say, it's just another night of easy work for me," McGregor said of his next fight. "I don't just own the game. I run it too."
McGregor is coming off a 13-second knockout win over Jose Aldo for the 145-pound title at UFC 194 on Dec. 12. It set a promotional record for fastest finish in title-fight history. Fighting out of SBG Ireland in Dublin, McGregor is 7-0 in the UFC and will look to become just the third fighter ever to win UFC titles in multiple weight classes.
ESPN's Brett Okamoto contributed to this report.
Are Mayweather's race comments justifiable?
The Highly Questionable crew share their thoughts on Floyd Mayweather's insinuation that racism still exists in boxing and MMA.