The 21-year-old had previously appeared 17 times off the bench but rewarded home boss Brian Rice's decision to start him as he cancelled out Ryan Williamson's opener before curling home a stunning second.
Shea Gordon squared it up again though before Accies defender Aaron McGowan blew the chance to send Hamilton top of Group F when he blazed over with a penalty.
That sent the game to a shootout, which Accies edged when Jags new-boy Rafa De Vita saw his attempt saved by Owain Fon Williams.
Accies now close to within one point of Gary Caldwell's leaders with one game to play - but the result came at a cost for Rice after Ronan Hughes and Brian Easton both went off injured.
Thistle struck first after McGowan's 16th-minute blunder allowed Williamson to loft a delicate finish over Fon Williams.
But Jags' celebrations were curtailed 60 seconds later when Cunningham turned in the box and drove into the bottom corner.
A hush then fell over the ground as paramedics rushed to attend to Hughes after he crumpled to the deck following a collision with Joe Cardle.
The midfielder was placed in a brace as a precaution before being taken off on a stretcher - with Easton then going off nine after rolling an ankle during the nine-minute long period of added time.
Accies had been out-played during the first period but grabbed the lead on 54 minutes as Cunningham swept a stunning finish into the top corner.
Thistle levelled up with quarter of an hour left as Gordon converted from Lewis Mansell's delivery - but Hamilton blew the chance to retake command almost immediately when McGowan skied a penalty after Sean McGinty dragged down George Oakley.
Thistle pushed for the win but the game went to penalties as Accies held on.
After 11 successful kicks in the shootout, it was Thistle debutant De Vita who was the first to falter.