Irish UFC lightweight champion McGregor, 28, said: "The fight is on."
It is reported that each fighter could earn $100m (£78.4m) from the bout, which would be one of the richest in boxing history.
Former five-weight world champion Mayweather, widely considered the best boxer of his generation, retired unbeaten in 2015 after 49 bouts.
It followed a successful defence of his WBC and WBA welterweight titles, a victory that equalled Rocky Marciano's career record of 49-0.
Mayweather retired for the first time in 2008 after 39 fights.
Mixed martial artist McGregor, who has never boxed professionally, became the UFC's first dual-division champion in November 2016 and has previously challenged Mayweather to a fight under mixed martial arts rules.
His boxing licence was granted by the California State Athletic Commission in December, allowing him to box in the US state.
UFC president Dana White, who took part in negotiations on behalf of McGregor, told ESPN: "We have been in talks for a while.
"They went smooth. Floyd Mayweather surrounds himself with smart people and we got the deal done. The impossible deal is now done."
He added: "I'm not saying Conor McGregor's going to win. I'm not saying Floyd Mayweather's going to win.
"But the reason Conor McGregor's as big as he is is he'll fight anybody, anywhere, anytime. He will go after Floyd Mayweather and he will try to knock him out." SHARE YOUR STORY WITH US VIA EMAIL: INFO@247NIGERIANEWSUPDATE.CO RECEIVE NEWS VIA OUR WHATSAPP, KINDLY TEXT +234 701 056 0394 TO ADD YOU CLICK HERE TO JOIN US ON OUR YOUTUBE CHANNEL FOR NEWS UPDATE CLICK HERE TO JOIN US ON TWITTER FOR INSTANT NEWS UPDATE: @247NGNEWSUPDATE CLICK HERE TO JOIN MILLIONS AROUND THE GLOBE TO READ NEWS ON OUR FACEBOOK FAN PAGE FOR INSTANT UPDATES ON INSTAGRAM CLICK HERE RECEIVE INSTANT NEWS UPDATE VIA OUR BBM BROADCAST: D3EDEFDF PLACE YOUR TEXT ADVERT BELOW:>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>