UFC president Dana White confirmed the 170-pound bout during a news conference on Friday in Rio de Janeiro.
Condit (29-8) will return to the Octagon following a 14-month layoff thanks to a torn ACL and partially torn meniscus in his right knee. The 30-year-old suffered the injury during the second round of a TKO loss to Tyron Woodley at UFC 171 last March.
Fighting out of Jackson-Winkeljohn MMA in Albuquerque, New Mexico, Condit is 1-3 in his past four fights. He won an interim UFC title by defeating Nick Diaz in February 2012, but has since suffered losses to Georges St-Pierre, Johny Hendricks and Woodley. The May bout will mark his 11th in the UFC.
Alves (21-9) will look to build on the momentum of a two-fight winning streak, including a second-round TKO against Jordan Mein earlier this year. The 31-year-old has managed just three total appearances since 2012 due to various injuries, but has looked good in each of his past two showings.
A longtime member of American Top Team in Coconut Creek, Florida, Alves challenged St-Pierre for the welterweight title at UFC 100 in July 2009. He lost via unanimous decision.