UFC officials announced the matchup on Saturday. The title fight will headline a UFC 158 event, scheduled to take place at the Bell Centre in Montreal.
It's the third time the UFC has booked the fight. The two were scheduled to meet in October 2011 and again in February, but both bouts fell through, mostly due to a torn ACL injury suffered by St-Pierre.
"It's time to make that big fight against Diaz," St-Pierre said. "I'm doing a favor for the fans. I think it's the fight that will sell the most. The UFC wants to put on the big fights. It's what people want to see."
St-Pierre (23-2) returned from injury last month to defeat Carlos Condit via unanimous decision at UFC 154. There was speculation he'd move on to a proposed matchup against middleweight champion Anderson Silva.
The Canadian champion instead requested Diaz (26-8) who hasn't fought since losing to Condit in February. Diaz received a one-year suspension following the bout after testing positive for marijuana metabolites.
Welterweight Johny Hendricks is again the odd man out even though the former collegiate All-American wrestler is on a five-fight win streak, including a 46-second knockout over Martin Kampmann last month.
"I do feel bad for Johny Hendricks but put yourself in my shoes," St-Pierre said. "This fight (with Diaz) has been waiting to happen for a long time and it's the big fight."