The welterweight bout was confirmed on Wednesday’s edition of “UFC Tonight” on FOX Sports 1.
Brown has lost his last two fights, in March he was well beaten by former welterweight champion Johny Hendricks at UFC 185.
In July last year Brown lost a No. 1 contenders fight to Robbie Lawler ending his seven-fight winning streak.
The upcoming fight sees Diaz will be making his return to the welterweight division for the first time since 2011. After initially winning two fights as a welterweight he dropped down a division after losses against Dong Hyun Kim and Rory MacDonald.
UFC 189 will be headlined by a featherweight title fight between Jose Aldo and Conor McGregor.
Also on the card, Lawler will defend his welterweight title against MacDonald and Dennis Bermudez will take on Jeremy Stephens.