Chasing Bangalore’s 180 for four, Duminy led the Cobras to 184 for five as the South African side secured victory with two balls of their innings remaining.
The 25-year-old Duminy eclipsed his previous best T20 score of 93 and he faced just 52 balls during his innings while striking eight fours and five sixes.
The left-handed batsman reached his 13th T20 half-century off 30 balls and his knock rescued his team after the Cobras had slipped to 14 for two.
Duminy also shared in three partnerships worth 41 runs or more with Henry Davids (27), Justin Ontong (19) and Paul Canning (20).
Canning and Duminy added a vital 61 runs off 36 balls for the fifth-wicket to put the Cobras within sight of victory before Canning was caught at midwicket off the bowling of seamer Praveen Kumar.
Canning was dismissed with the Cobras needing 16 runs off 10 balls but Duminy kept his head and struck two fours and a six off the next six balls.
Rory Kleinveldt then ended the match in some style by stroking a four through the covers off the bowling of medium-pacer Vinay Kumar.
Praveen Kumar was Bangalore’s most successful bowler as he captured three for 32 off four overs.
Earlier, Robin Uthappa and Ross Taylor posted half-centuries to help the home side to their final total.
Opening batsman Uthappa scored 51 off 39 balls before being caught by Herschelle Gibbs at point off the bowling of Monde Zondeki with Bangalore on 82 for two in the 11th over.
Taylor then provided his team’s innings with some late impetus as the New Zealander smashed his way to 53 not out off 24 balls with four fours and four sixes.
The Cobras’ cause in the field was not helped by poor catching, they dropped three chances, while they also lost experienced swing bowler Charl Langeveldt who looked to have aggravated a shoulder injury.
Langeveldt, who had opened the bowling for the visitors, sent down a probing spell of 3-0-12-1 before having to leave the field after he landed heavily on his shoulder while attempting to take a catch.
After Bangalore’s captain Anil Kumble had won the toss and elected to bat the Cobras made a good start when Langeveldt had Jacques Kallis (8) caught behind by keeper Ryan Canning.
Uthappa and Rahul Dravid (28) then combined for a second-wicket stand worth 68 runs off 47 balls before the right-handed Uthappa was dismissed.
Teams:
Cape Cobras - Andrew Puttick (capt), Herschelle Gibbs, JP Duminy, Henry Davids, Justin Ontong, Vernon Philander, Rory Kleinveldt, Ryan Canning, Claude Henderson, Charl Langeveldt, Monde Zondeki. Royal Challengers Bangalore - Manish Pandey, Robin Uthappa, Jacques Kallis, Rahul Dravid, Ross Taylor, Virat Kohli, Mark Boucher, Roelof van der Merwe, Anil Kumble (capt), Praveen Kumar, Vinay Kumar.