Hamilton broke the Cardiff defence in the 23rd minute to score under the posts and finish off a fine move that had started with clever interplay between Sam Vesty and Toby Flood in midfield.
Dupuy added the conversion to an earlier penalty as Tigers held a 10-3 lead at that stage.
However, Cardiff, who had taken the lead through Ben Blair’s 13th minute penalty, struck back through another Blair penalty and two long-range efforts from Leigh Halfpenny.
A see-saw first-half ended with Tigers in front when Nicky Robinson held onto the ball under pressure from the Tigers backs next to his own posts and Dupuy slotted the penalty.
All Black Hamilton was the only change to the Tigers backs from the team that played Bristol Rugby last weekend. Prop Marcos Ayerza came into the front row alongside George Chuter and Martin Castrogiovanni. Craig Newby was named at blindside with Ben Woods and Jordan Crane completing the back row as Tom Croft and Ben Kay continue at lock.
Cardiff Blues made one change to their line-up with Richie Rees starting at scrum-half following injury to Jason Spice. Darren Allinson takes the place of Rees on the bench.