Dundee made one change from last week was the return of Seun Adewumi in attack with Seb Palmer-Houlden switching to the bench.
Dundee started well and forced Motherwell's keeper Aston Oxborough a shot from Seun Adewumi, and then parried Ziyad Larkeche’s follow up.
Soon after he saved well from a Joe Shaughnessy header from a corner. Motherwell had a header which was just over the bar, and Slattery missed the target when in a good position.
The Dark Blues took a deserved lead after 31 minutes from a long throw by Ryan Astley on the right. The ball broke to Antonio Portales who smashed home a superb finish into the top corner from 16 yards.
As the clocked ticked over into stoppage time Portales repeated the trick, firing into the same corner following another throw by Astley. With the ball already on the centre spot a VAR review decided that the goal should be disallowed for offside. Clark Robertson had moved back from an offside position to challenge as the ball broke to Portales.
Second half and it was Motherwell who seemed to get a lift after making changes, But Dundee had a chance after a cross from Murray and Cameron just failed to fully connect to trouble the keeper.
But a minute later Motherwell scored to level the game when after a clever ball forward it fell to Sparrow who neatly finished the move.
Dundee failed to get back into the game and the only real chance was when good play set Josh Mulligan who blasted the ball over the bar.
Both teams struggled to take control as the game became scrappy. After 79 minutes John Koutroumbis put in a fierce challenge on Ziyad Larkeche. The referee played advantage initially but showed the yellow card before changing it to a red card after a VAR review.
At least Var got that one right. Simon Murray had a free kick blocked and Motherwell broke and Carson had to save to keep the score level. Soon after Motherwell hit the bar, and the effort after was put over the bar.
Charlie Reilly came on for Ryan Astley as Dundee chased a winner, but they were caught again on the break in the first minute of added time. Dominic Thompson ran down the right and crossed to the far post where Maswanhise rose to score with a superb header.
It looked poor defending from Dundee and it's been like that a few times this season at home.
Dundee had one last chane but Lyall Cameron was unlucky to see his shot just go past the post.
The defeat will make the last three game massive now. They must pick themselves up for the game at Rugby Park this Saturday.
Dundee: Carson, Astley (Reilly 84), Shaughnessy (c), Clark Robertson, Larkeche, Mulligan, Portales (Fraser 72), Cameron, Tiffoney, Murray, Adewumi (Palmer-Houlden 65). Unused Subs: McCracken (gk), Samuels, Fin Robertson, Koumetio, Sylla, Donnelly.
Referee: Kevin Clancy.
Att: 5,692.