Miller, a native of Sparta, N.J., has steadily climbed the lightweight ladder, winning eight of his last nine fights.
During his most recent outing on Jan. 20 in Nashville, Miller submitted Melvin Guillard with a rear-naked choke. The first-round finish improved Miller's overall record as a pro to 21-3.
After flirting with the welterweight division for two years (compiling a 2-2 mark), Diaz returned to 155 pounds on Sept. 24 and submitted highly regarded Takanori Gomi in the first round. He won his second fight in a row with a unanimous decision over Donald Cerrone at UFC 141 on Dec. 30.
Diaz, a native of Stockton, Calif., is 15-7 overall.
In addition to the Miller-Diaz bout, John Dodson has agreed to face Darren Uyenoyama in a flyweight showdown, according to UFC.com.
The May 5 card will be the UFC's third appearance on Fox television. Its second event on the network is slated for Saturday night in Chicago, where light heavyweight contenders Rashad Evans and Phil Davis battle on that card's main event.
Franklin McNeil covers mixed martial arts and boxing for ESPN.com. Follow him on Twitter at www.twitter.com/Franklin_McNeil