Accies fought back from going behind to secure their third SPL victory which moved them into the top half of the table.
The much-admired McCarthy, still only 17, helped set up David Graham’s stunning 34th-minute equaliser after Gary McDonald’s first Aberdeen goal had failed to kick-start a dull first half.
McCarthy hooked home just before the hour mark in a lively second period and only a free-kick against the bar from Sone Aluko threatened to prevent Hamilton’s deserved victory.
Aluko, who replaced the injured Jamie Smith, was one of the few positive performers for Aberdeen on his first appearance since his deadline-day move from Birmingham.
The teenager immediately reproduced the form which excited the home fans during his loan spell last season when he sped past Simon Mensing and sent over a dangerous cross which just evaded Lee Miller.
Hamilton, who gave Martin Canning a debut in place of the injured Chris Swailes, broke seconds later and Alex Neil’s cross was just missed by Finnish winger Sebastian Sorsa, who was making his SPL debut.
The Dons took control of the early stages and McDonald put them ahead in the seventh minute.
Miller laid back Andrew Considine’s low cross into the path of the former Oldham midfielder who sidefooted home from 18 yards despite Tomas Cerny pushing the ball on to the post.
Aberdeen fans would have expected the goal to act as a catalyst to some attacking play but the home players sat off and the game lapsed into an uneventful midfield scrap.
Hamilton had plenty of possession but were struggling to trouble the home defence while the Dons only briefly stepped up a gear when Charlie Mulgrew and McDonald shot well off target from long range.
Visiting boss Billy Reid changed his midfield in the 32nd minute when he replaced Tony Stevenson with McCarthy, who made his Republic of Ireland Under-21 debut in midweek in Portugal.
McCarthy was involved in the equaliser just two minutes later but Graham deserved all the credit for bringing the game to life.
The teenager’s cross from the left eventually dropped for Graham 16 yards out and the winger struck the ball first time into the top corner.
Hamilton immediately looked sharper but Aberdeen had the best chance to take a half-time lead when Aluko’s teasing low cross flashed just in front of Darren Mackie at the near post.
Miller headed home at the start of the second half but McDonald had already been penalised for a push as he met Derek Young’s corner.
Hamilton should have gone in front moments later after Mensing slipped a ball into the right channel for McCarthy, but Richard Offiong completely missed the cutback under pressure from Considine.
They did not have to wait long though as McCarthy burst on to Offiong’s header in the 59th minute and hooked the ball over Jamie Langfield from 15 yards despite being tracked by Considine.
Aberdeen boss Jimmy Calderwood made all his changes before the midway point of the second half by bringing on Chris Maguire, Zander Diamond and Jeffrey de Visscher for Mackie, Considine and Young, while Lucas Akins and Mark Corcoran came on for Hamilton.
McDonald forced his way into another shooting opportunity but was a yard too high and Aberdeen were lacking the guile to create clear chances.
Corcoran had a decent chance to add to Hamilton’s lead when he fired over from a tight angle after the hosts failed to pick him up following his corner.
Aberdeen put pressure on in the closing stages but they were restricted to long-range efforts. Richard Foster had a shot deflected narrowly wide before Aluko hit the top of the bar from a 25-yard free-kick.