Diaz beat McGregor in their first bout in March, inflicting the 27-year-old Irishman's first defeat since 2010.
Plans for a rematch at July's UFC 200 were scrapped after a dispute between McGregor and organisers.
The fight was announced during the UFC 199 show on Saturday, where Michael Bisping became the first Briton to win a UFC title by beating Luke Rockhold.
Featherweight champion McGregor fought Diaz at 170 pounds, 25 more than his usual limit, at UFC 196 in March.
American Diaz, 31, won by submission in the second round, ending McGregor's 15-fight winning streak.
Conor McGregor's welterweight rematch with Nate Diaz will take place at UFC 202 in Las Vegas on 20 August.