Motherwell took the lead inside five minutes through Christopher Long and looked set to blow their Lanarkshire rivals away.
But Accies gradually asserted themselves and went on to dominate the second half as Moyo set up Aaron McGowan to equalise and then sealed a 2-1 derby victory in the 77th minute.
The win moved Hamilton five points clear of Ladbrokes Premiership bottom club Hearts, while Motherwell saw their lead over fourth-placed Aberdeen cut to a point.
The hosts started with real purpose to their play and Liam Polworth saw a volley deflected just wide inside the first minute.
Hamilton also had an early chance but Moyo – a summer signing from St Albans – shot straight at Mark Gillespie from eight yards.
Motherwell soon took the lead as Long received the ball with his back to goal and Sam Stubbs tight on him but he turned the defender and fired a shot just inside the far post.
Polworth had an effort saved and Long stabbed wide under pressure after running on to a long ball as Motherwell continued to dominate.
But they lost their impetus and Hamilton got a foothold in the game without seriously threatening – Mikel Miller hitting some harmless efforts from long range.
They came close when Gillespie did well to tip over Moyo's dipping volley.
But Moyo flashed a header wide from McGowan's cross moments later and the pressure soon paid off in the 68th minute.
Moyo headed the ball down for McGowan whose shot took a deflection and fizzed inside Gillespie's near post.
And the visitors took the lead when McGowan delivered a deep cross and Moyo rose well to head back across goal and inside the post.
Motherwell brought on Ross MacIver and went three up front but they never looked like grabbing an equaliser.