Lockwood's 20th-minute effort was enough to separate the sides as Dundee got all three points on their own turf at the sixth time of asking.
Hearts remain in the bottom half of the table and have the ignominy of being the team responsible for six of the seven points gained by the Dens Park club so far this season.
The already devastated Dundee defence was delivered a further blow this week with the news that full-back Brian Easton is set to miss eight weeks with a hamstring injury.
However, it would be Easton's replacement who gave the hosts the lead.
Lockwood slotted in at left-back in what was a threadbare defensive unit. To protect his young back four, Dens manager Barry Smith opted to have his side sit deep and defend in numbers.
Throughout the first half Hearts enjoyed greater possession but rarely looked likely, or even capable, of finding a gap through which to exploit the opposition's rearguard.
In contrast, Dundee enjoyed a wealth of space on the counter attack as they looked to take advantage of any opportunity Hearts granted them, something they did in style in the 20th minute.
Marius Zaliukas came crashing through the back of Gary Irvine in his pursuit to win the aerial battle on the very edge of the Hearts penalty area.
Dundee claimed the infringement had occurred inside the box but the argument proved irrelevant as Lockwood stepped up to power the ball past Jamie McDonald and into the top corner of the net.
It would be through a free-kick of their own that the visitors finally managed to test Rab Douglas in the 33rd minute. Arvydas Novikovas 30-yard curling effort had to be pushed away by the veteran stopper.
Dundee should have extended their advantage four minutes before half-time. Steven Milne's dummy, from a Lockwood ball forward, froze the Hearts defence and allowed Colin Nish to drift on to the pass with a free route to goal 30 yards out.
The former Hibs striker rounded McDonald but saw his shot blocked by the recovering Zaliukas.
In the first seven minutes following the restart, Hearts carved out two half-chances as their forward pair of Callum Paterson and John Sutton took to the action with an improved determination.
Sutton's hooked effort, following a Paterson cross from the right, was well saved by Douglas before the striker had a goalbound header deflected wide for a corner.
Dundee settled down after Hearts early flurry and on 60 minutes Nish found another clean route to goal foiled by the outstretched leg of a recovering defender.
This time it was Andy Webster who was the saviour, as his sliding block denied Nish after the ball broke to the striker a yard inside the penalty area.
Instead of creating chances at one end, Hearts were gifting them at the other. Fortunately for the visitors, and the game as a contest, Dundee were reluctant to accept as they spurned two glorious chances in the space of 30 seconds.
Carelessness from Webster allowed a routine ball forward to slide under his boot and into the path of substitute John Baird. The former Raith striker saw his placed shot from 12 yards touched round the post by McDonald.
From the resulting corner, centre-back Declan Gallagher somehow sliced wide when the ball dropped on to his right foot inside the six yard box.
An opposing centre-back then wasted a similar opportunity at the other end as Zaliukas' free header from six yards out flew over the frame of the goal. Five minutes later the Hearts captain then had another header held by Douglas..