Hearts will play Rangers in the semi-final of the Viaplay Cup with Hibs taking on Aberdeen.
Hearts against Rangers was first out the hat in tonight's draw with Hibs and Aberdeen completing the final four.
The semi-final fixtures will be played on November 4/5.
Rangers progressed into the final four with a comfortable 4-0 win over Livingston at Ibrox.
Abdallah Sima opened the scoring in the 10th minute as he robbed Jamie Brandon before curling into the far corner. Livingston players protested for a foul over a push on Brandon but it was waved away by Willie Collum.
Ridvan Yilmaz doubled the hosts' lead in the second half as he charged from within his own half to the edge of the box where he poked into the bottom corner to score his first Rangers goal.
And Sima was heavily involved in the third as he raced clear of the Livingston defence before his cross deflected off Luiyi de Lucas and into the net. Ryan Jack ended the contest with a fourth as he curled home in additional time.
Hearts clinched their spot in the semi-final on Tuesday night as Alex Lowry's stoppage time striker sealed a place at Hampden. Brad Lyons' strike had earlier cancelled out a Jorge Grant opener.
Hibs joined their Edinburgh rivals in the final four with a 4-2 win over St Mirren.
Scott Tanser had fired St Mirren into a 1-0 lead before the break, however, Nick Montgomery's side rallied to take victory in the second half.
Elie Youan and Dylan Vente inspired a quick turnaround after the break before the Buddies levelled through Keanu Baccus.
But Hibs would go on to win with a Martin Boyle double seeing the capital club into the semi-final of the competition.
And Aberdeen booked their spot at Hampden with a 2-1 triumph over Ross County in Dingwall.
Graeme Shinnie blasted an opener into the net after eight minutes before the hosts were reduced to ten men with Jack Baldwin shown a straight red.
Ester Sokler doubled Aberdeen's lead with ten minutes left to play before Kyle Turner grabbed a consolation for Ross County from the penalty spot.
Viaplay Cup semi-final draw in full
Hearts vs Rangers
Hibs vs Aberdeen