McHugh had only been on the pitch for eight minutes in Saturday's SPL clash at Fir Park when he met a clearance following an Aberdeen corner and slotted home past visiting goalkeeper David Gonzalez.
Chris Humphrey and Tim Clancy had hit the crossbar in each half for the hosts, while the outcome means Aberdeen remain without an away goal in league action so far this term.
Aberdeen manager Craig Brown made four changes in the wake of the Pittodrie outfit's League Cup humbling by East Fife. Youl Mawene and Rob Milsom returned from injury with Rory Fallon and Isaac Osbourne promoted from the bench.
They replaced Darren Mackie, Rory McArdle, Peter Pawlett and Josh Magennis, who were all among the substitutes.
Motherwell manager Stuart McCall named an unchanged team for the third successive game as his third-placed side - who lost to Hibernian in a midweek penalty shoot-out - aimed to bounce back from a 3-0 home defeat by St Johnstone in their last league outing.
Motherwell went for goal straight from the outset with Jamie Murphy trying his luck after less than 30 seconds and sending a shot just wide of the right-hand post.
Ryan Jack had Aberdeen's first effort on target on eight minutes after doing well to work his way down the right flank, but the eventual attempt was easily cut out by Darren Randolph.
Home winger Chris Humphrey looked lively on the right wing in the early stages and Dons defender Kari Arnason was called upon to clear his cross at the near post after good work from Tom Hateley.
Scott Vernon forced the first save of real note after 16 minutes, Randolph having to beat his shot from outside the area round the left-hand post.
Humphrey had the home fans on their feet after 25 minutes as he looked set to open the scoring.
He raced to meet a misplaced ball at the halfway line, sprinted to goal and held off Arnason.
But despite successfully rounding goalkeeper Gonzalez and getting into a good position, he saw his angled shot strike the crossbar.
Steve Jennings and Keith Lasley linked well in the Motherwell midfield seven minutes from the break to put Michael Higdon into possession on the 18-yard line.
But the forward was dispossessed and the visitors immediately counter-attacked, only for the ball to be cleared from Vernon and Fallon just outside the six-yard box.
Nicky Law tried a shot from outside the area which presented little challenge to Gonzalez, while Aberdeen earned a 22-yard free kick two minutes from the break but Arnason's set piece was instantly blocked.
Motherwell again started the second half with an instant attempt to break the deadlock but for a second time were denied by the woodwork.
Hateley lifted a 25-yard free-kick to the left side of the box where it was met by Tim Clancy, but his header hit Gonzalez's crossbar.
Aberdeen replied with two early corners, both of which led to counter-attacks.
Murphy received a good pass from Keith Lasley on the hour and set off for goal but was unable to get into a scoring position inside the box. The hosts retained possession and the forward then had another attempt but his header went straight into the goalkeeper's hands - as then did a similar effort by Vernon at the other end.
Stevie Hammell sent in a free-kick which was spilled by Gonzalez, but the goalkeeper managed to recover possession despite tangling on the ground with Jennings.
Vernon tried his luck from the edge of the penalty area from Richard Foster's pass from the right with 15 minutes to go, but Randolph was equal to the rising drive.
Motherwell finally broke the deadlock with seven minutes to go when they rapidly counter-attacked after twice clearing Milsom's deliveries from the right corner.
McHugh produced his match-winning intervention.
He raced to collect Stephen Craigan's clearance upfield, held off and then took advantage of a slip by Foster on the right touchline and raced up the rest of an empty pitch, cutting inside to net his first SPL goal at the near post.