The decisive moment arrived after just 12 minutes when McGinn found the top left-hand corner when his attempted cross from the right sailed over goalkeeper George Long and into the net.
Motherwell’s latest defeat leaves them bottom of the Scottish Premiership table following a terrible run of results that has yielded just one point from their last eight games.
It was Dundee’s third victory over Motherwell this season and, although they were only slightly superior, the result stretched their unbeaten run to eight games.
The early stages were disjointed and scrappy, with neither side able to take control, until McGinn’s fortuitous effort put the visitors ahead.
Five minutes later Paul McGowan flashed wide from 22 yards as the Dark Blues chased a second goal.
Greg Stewart had a 10-yard strike parried by Long as Motherwell continued to struggle before the break.
And it failed to improve for the hosts in the second half with Long called into action once again to save from Stewart and later McGinn.
Despite a flurry of late corners, Well were unable to find any inspriration and now face a battle to escape the clutches of possible relegation from the Scottish Premiership.