The Irishman, a former two-weight world champion, returned from retirement for the rematch at UFC 257 in January, but was shocked when Poirier won.
In their first meeting in September 2014, McGregor had stopped the American in 106 seconds.
"The war has been set!" According to McGregor's Instagram account. "On July 10th, you'll see what the Mac is all about."
McGregor (22-5) will be aiming for his first victory since January 2020, while Poirier (27-6) hasn't lost since losing to Khabib Nurmagomedov in 2019.
UFC 264, which UFC president Dana White allegedly plans to keep in Las Vegas, will host the trilogy fight.
McGregor's victory in their first meeting put him on the road to global renown. Before facing Floyd Mayweather in one of the richest boxing bouts in history in 2017, he became the UFC's first dual two-weight champion.
Poirier, on the other hand, had to work his way back into championship contention over time and is now the top lightweight contender, having lost just two of his 13 fights since 2014.