Dundee will take a 2-1 lead into the second leg of the Scottish Premiership play-off final at the BBSP Stadium, Rugby Park, next week.
Jordan McGhee gave James McPake's Championship side an early lead and Charlie Adam doubled their advantage shortly after the interval.
Defender Brandon Haunstrup pulled one back for Killie with 13 minutes left to leave it all to play for when the sides meet again on Monday, live on Sky Sports at 7.45pm.
Meanwhile, Dumbarton have retained their League 1 status despite a 1-0 home defeat to Edinburgh City in the second leg of their play-off final. Ouzy See scored the only goal for City, who had Liam Henderson sent off shortly after, but the Sons triumphed 3-2 on aggregate.