Hemmen had a chance to put the visitors ahead early on after a mixed-up back-pass for Heracles but the striker could not get to the ball in time.
The forward created another opportunity for Cambuur shortly before the break, but launched the ball just wide from the edge of the box.
The hosts were reduced to 10 men with just over 20 minutes still to play when Oussama Tannane received his second yellow of the match, having also been booked in the first half.
Meleg was involved again in injury time when the visitors won a late corner, with the on-loan striker curling the ball in for Hemmen to head in the winner.
The win leaves Cambuur fifth in the table, while Heracles sit bottom.