Holders Bo’ness made it through to the next round – but only after they scraped a win on penalties against their Premier League opponents.
Bo’ness got off to a flyer when they went ahead after just two minutes. Nicky Walker played in Colin Strickland and the forward tucked the ball into net with a neat right-footed finish.
Dalkeith tried to get back into it and Scott Ritchie made a good save after Blake Wales had played in Duncan Muir.
United then passed up a great chance to extend their lead when Robert Sloan swung in a free-kick and Ross Campbell saw his close-range header saved by James McQueen.
The equaliser came for the hosts on 21 minutes when a John Robertson cross evaded Stewart Devine and Tyron McLean collected the ball before drilling a low shot into the corner.
A dull period ensued with little in the way of goalmouth action until Dalkeith took the lead just before the break when debutant Daryl Devlin turned well in the box and his low shot found the net.
After the interval, Bo’ness had a penalty appeal turned down when Walker was challenged in the box.
As United pushed for a goal the hosts had opportunities on the break with only good defending from Philp prevented Muir from going through on goal and then Ritchie had to be lively to save from Muir.
The leveller finally came on 84 minutes. Marty Wright did well on the by-line before cutting the ball back to fellow substitute Fraser Keast, who finished from close range to take the game to penalties.
In the shoot-out, Wright and Chris Donnelly scored their penalties before Ritchie was the hero with a fantastic save from James Redpath.
Keast, Sloan and Philp then scored their penalties to ensure that Bo’ness progressed, though they will need to improve if they want a repeat of last season’s trophy win.