The draw took place live on RTÉ Radio 1, after Westmeath beat Meath to relegate their neighbours, and Laois overcame Kerry.
Leinster SHC quarter-final line-up:
Westmeath vs Offaly
Laois vs Wexford
Galway vs Dublin
The winner of Laois vs Wexford is rewarded with a date against Kilkenny in the semi-final.
Meanwhile, Westmeath vs Offaly is on the same side of the draw as Galway vs Dublin.
The O’Moore County pulled off a victory over 14-man Kerry at Austin Stack Park in Tralee, on a scoreline of 2-21 to 3-15.
Meanwhile, Westmeath overcame a spirited Meath side, 1-18 to 0-19, as the Royals are now relegated to the Christy Ring Cup next season, despite an opening-game win over Kerry.
Unlike previous years, this draw was made after the round of group games. In 2016, it was randomly determined that the group winners would play Galway, while the runners-up would take on Laois. Therefore, Westmeath were given a more difficult task than Offaly, despite finishing above them.