A late goal from substitute Steve Lovell lifted Aberdeen into second place in the table.
In a game short of goalmouth action, the Dons just about deserved the win as they dominated the midfield area.
There was plenty of endeavour but little guile in a poor opening but Aberdeen almost broke the deadlock when Barry Nicholson's corner broke to Russell Anderson. The Dons skipper stabbed a low shot towards the bottom corner but Bruno Aguiar was on the line to clear.
Aguiar then hit a couple of long-range efforts that didn't greatly trouble James Langfield before Scott Severin blasted a decent chance high and wide.
But Hearts came close when Edgaras Jankauskas got his head to Aguiar's corner and it took a combined goalline clearance by Langfield and Chris Clark to keep the ball out.
However, Lee Miller was even closer at the other end as his lob beat newly-installed Hearts captain Craig Gordon but cannoned off the post.
Substitute Paul Hartley gave Hearts a lift when he came on and he had a goal chalked off for offside and then fired a 20-yarder inches wide of the target.
A glaring miss from Andrius Velicka from only five yards was to prove costly as the Dons grabbed the winner three minutes from time.
Severin picked up Jamie Smith's pass and drilled a low 25-yarder that Gordon did well to stop, but Lovell was quickest to react and fired home the loose ball from close range to hand the Dons victory.