A penalty from Steven Pressley cut short Dundee's celebrations as Hearts left Dens Park with a victory.
Dundee had come out of administration on Friday but were under pressure for much of the game.
New Hearts striker Ramon Pereira was the main threat and struck a drive against the crossbar.
Dundee had a claim of their own turned down before Pereira was brought down by goalkeeper Derek Soutar, who was beaten by Pressley's spot kick.
Dundee's summer signings, Bobby Mann and John Sutton, had been handed their debuts, while Soutar was chosen ahead of new goalkeeping signing Kelvin Jack.
Hearts were without injured striker Mark de Vries, which meant Ramon Pereira started alongside Graham Weir up front.
The visitors created the first opportunity after eight minutes, when Pereira set up Weir on the edge of the box and Soutar managed to palm away the drive.
Pereira then volleyed a Joe Hamill cross off the bar.
Dundee rarely threatened and, when Sutton found space on the edge of the box, the on-loan Millwall striker drove well over.
Soutar was called into action again to smother Pereira's little head flick from Hamill's cross into the box.
But he let the ball slip from his grasp and had to scramble across to save before the onrushing Weir pounced to score.
Hearts goalkeeper Craig Gordon had to be alert to save shortly after the break after Neil Jablonski found space on the edge of the box and volleyed Lovell's cross on target.
The hosts had a penalty claim denied five minutes after the restart when Lovell, who had raced on to a brilliant defence-splitting pass from Brent Sancho, appeared to be fouled by Alan Maybury.
Phil Stamp then drew a good save from Soutar with a rising effort from Perreira's cut back.
The young goalkeeper was in action again minutes later, keeping away Maybury's long-range shot.
Hearts grabbed the winner with six minutes remaining.
Pereira bolted through to collect Hamill's defence-splitting pass and whipped the ball past Soutar, who had already committed himself to a challenge and took the Spaniard's feet from beneath him.
Club captain Pressley stepped up to take the kick and fired into the right-hand corner.
Dundee: Soutar, Smith, Mann, Sancho, Hernandez Santos, McDonald, Jablonski (Anderson 64), Brady, Robb (Fotheringham 77), Sutton, Lovell.
Subs Not Used: Jack, Larsen, McNally.
Hearts: Gordon, Maybury, Pressley, Webster, Kisnorbo, Neilson, Stamp (Stewart 75), Hartley, Hamill, Pereira (Sloan 86), Weir (Wyness 81).
Subs Not Used: Moilanen, MacFarlane, McAllister, Berra.
Booked: Kisnorbo, Neilson, Pereira.
Goal: Pressley 85 pen.
Referee: C Thomson