The visitors started brightly and Scott McDonald almost put them ahead in the opening minute but his close-range efforts were blocked by Derek Soutar and then Barry Smith.
Tom McManus went close for Dundee on 16 minutes but his effort from the edge of the box went over Gordon Marshall but just wide of the target.
Great play between Jim Hamilton and Kevin McBride set up a great chance for the latter and when it looked like he would score, Soutar dived low to his right to deny the striker with 32 minutes played.
It only took the visitors another three minutes to take a well-deserved lead and it was McDonald who collected a pass from Scott Leitch and rolled the ball past Soutar from ten yards.
As the game moved into first half time added on, Dundee grabbed an equaliser much against the run of play when Steve Lovell shot left-footed past Marshall from 12 yards after a great pass by Fabian Caballero had set up the chance.
Ten minutes after half-time, Lovell grabbed his and Dundee's second of the match when he outran a defender to collect Caballero's through ball and despite looking to have lost the ball three times and ending up on his backside at one point, the striker still managed to retrieve the ball and knock it into the net from eight yards.
McDonald showed good feet inside the Dundee box to make himself a shooting opportunity but again Soutar saved the day for Dundee midway through the second half.
With only one minute remaining, Motherwell's intense pressure on the Dundee goal was halted momentarily by a breakaway which saw Lovell curl a 20-yard effort just wide as he went in search of his hat-trick.
A corner for the visitors in time added on gave them one final chance to get a point but the Dundee defence stood firm.