Dundee started with only one change when Yan Dhanda returning in the place of Fin Robertson, who was on the bench.
Dundee started the game well and could have scored in the first few minutes. One shot saved then another from Yogane which was cleared off the line. From the corner Hay hit the bar with a header.
It set the tone for the game with Dundee pushing forward all the time, and it looked just a matter of time and they would score.
But on 10 minutes Kilmarnock scored from a corner a good shot from Thompson hit both posts and went into the net. It was a blow but Dundee kept playing fast flowing football.
Minutes later and Billy Koumetio went down injured and after lengthy treatment he was replaced by Clark Robertson.
Dundee had shots blocked and saved as the ball would not break in front of goal. Kilmarnock battled away but caused Dundee very little problems.
Second half and again it was all Dundee, again Hay hit the bar with a header, then Congreve put a shot just wide of the far post after a great run.
Kilmarnock had a shot at goal in one rare break, but McCracken saved well. Again Dundee pushed forward.
Dundee then made two substitutions, sending on Imari Samuels and Charlie Reilly for Ryan Astley and Callum Jones. Samuels went to left back, with Drey Wright moving to the right. Reilly, rather than playing on the wing, took up an attacking midfield role just behind Hay.
But on 69 minutes Dundee finally scored good run by Luke Graham he found Charlie Reilly, and his pass put Ash Hay in the box he composed himself and smashed the ball home to level the cup-tie.
Dundee were now pushing for a winner and Reilly had had two shots at goal. Dundee sent on Simon Murray for Cameron Congreave for the fianal push.
Kilmarnock were happy just to try and get the game into extra time. Three minutes of injury time was on the board on 90 minutes.
But a minute later Dundee scored when a high ball into the box was totally messed up from the defender and keeper. The was headed out it fell to Drey Wright who smashed the ball home to put Dundee 2-1 up.
During the last ten minutes Kilmarnock got two players sent off for silly fouls, the second one was was near enought the last action of the game.
Dundee were superb and may it continute as the season gets better football wise. It's also Dundee's first win at Rugby Park in the Scottish Cup at the 7th attempt.
Dundee: McCracken, Astley (Samuels 67), Koumetio (Clark Robertson 17), Graham, Wright, Hamilton (c), Jones (Reilly 67), Congreve (Murray 84), Dhanda, Yogane, Hay. Unused Subs: O’Hara (gk), Digby, Fin Robertson, Halliday, Bevan.
Referee: Colin Steven
Att: 4,501
