Kilmarnock will face Celtic in the Premier Sports Cup semi-final.
The Ayrshire side defeated Dundee United 2-1 at Rugby Park on Tuesday night thanks to goals from Kyle Lafferty and Dan Armstrong.
The tie will be on either Saturday, January 14 or Sunday, Janaury 15 and it will be the Rugby Park club's first visit to Hampden in almost 11 years.
They were last at the national stadium in March 2012 when they beat Celtic 1-0.
Celtic were next to qualify for the last four with a convincing 4-0 win away to Motherwell thanks to a Liel Abada double along with goals from Reo Hatate and Kyogo Furuhashi.
Next in the hat was Aberdeen who beat Partick Thistle 4-1, with goals from Luis Lopes, Hayden Coulson, Ryan Duncan as well as a Kevin Holt own goal.
Rangers then defeated Championship side Dundee 1-0 thanks to a Steven Davis strike.
So far Killie have defeated the Arabs and also won away to Hearts in the second round.
They finished second in a group which featured Partick Thistle, Montrose, Fraserburgh and Stenhousemuir.
Don't miss the latest Ayrshire headlines – sign up to our free daily newsletter here