The UFC announced the bout on Saturday night. The 170-pound rematch was originally scheduled to headline UFC 200 on July 9, but the UFC pulled McGregor off the card in April when he refused to fly to Las Vegas to appear in a commercial shoot and news conference.
In mid-May, McGregor (19-3) met with UFC president Dana White and CEO Lorenzo Fertitta in Los Angeles to discuss rebooking the fight at UFC 202. Days after that meeting, however, the bout hit another bump when Diaz, who submitted McGregor at UFC 196 in March, asked to renegotiate financial terms of the rematch.
McGregor, 27, is coming off the first loss of his UFC career. He still holds the 145-pound championship he won in December by knocking out Jose Aldo in a UFC title fight-record 13 seconds.
McGregor was scheduled to fight 155-pound lightweight champion Rafael dos Anjos in March, but dos Anjos withdrew with a foot injury. That opened the door for a nontitle welterweight fight against Diaz (19-10), who accepted on 11 days' notice.
Fighting out of Dublin, McGregor told ESPN.com he wants the rematch to take place at 170 pounds again so that nothing would be different from their first fight.
"What kind of fighter would I be if I said, 'Hey, I didn't get you at 170, let me try to get you at 155,'" McGregor said. "I'll make my adjustments. I ate up to the weight. This time, I won't do that."
Diaz is coming off back-to-back wins against McGregor and Michael Johnson. Fighting out of Stockton, California, Diaz is a UFC veteran since 2007. He fought for the lightweight championship in December 2012 but came up short in a five-round decision loss to Benson Henderson.
Diaz attended the UFC 199 card Saturday night in Inglewood, California. Earlier Saturday in an Instagram post, he indicated that a rematch with Diaz had been agreed to again, showing a video with Dana White.