The game had been quite even up until the hour mark, with both sides creating chances. That was until Rams keeper Kelle Roos saw red for a last man challenge on Sharp outside the box.
From there on it was a case of holding on for a draw, which they were so close to doing, before Curtis Davies, who had put in a solid defensive display, conceded an 89th minute penalty.
Story of the match
The first chance of the game came through the hosts, as John Fleck drew a routine save out of Roos, setting the tone for the opening period.
That was then followed up with an opportunity for Sharp, who brought the ball down well before firing wide of the target, after he had beaten the offside trap.
A quiet spell followed, until the 37th minute, with Sam Baldock catching a left-footed effort sweetly, which flew just past the post, as Derby grew further into the game.
The second half began much like the first, with United on top, as Rhys Norrington-Davies saw his shot from a corner blocked well by Derby's Davies.
The game then took a twist on 57 minutes, as County goalkeeper Roos was sent off for colliding with Sharp as he raced clear on goal. Meaning that backup Ryan Allsop would be in net for the remaining half hour.
Davies was there again for Derby to block Iliman Ndiaye's effort, as the away side settled in for an attack against defence finish to the game.
Youngster Ndiaye then had a glorious chance to give the Yorkshire side the lead, getting it all wrong when he was presented with a free header at goal in the 77th minute.
Connor Hourihane and Enda Stevens both failed to take their chances until drama arrived in the final minute of normal time, as Davies was judged to have handled in the box, giving the Blades a spot-kick.
Captain Sharp made no mistake, converting the penalty to give his side all three points, as Lawrence hit the post right at the death for Derby.
Sharp comes to the rescue once more for the Blades
How many times over the years can Billy Sharp say he's come up with the winner for his hometown club? Well this is one that can be added to the long list.
It was heading for a frustrating result for Slavisa Jokanovic's side, as they'd probably edged the play, even before Derby went down to ten.
But the pressure eventually told at the crucial time, allowing them to make it three wins in their last four league games. Improving on their poor start to the season.
Wayne Rooney must keep the faith, as his side show promise
It's been a difficult spell for the Rams, surviving relegation on the final day of last term, and it'll be a tough task to stay up this season after their 12 point deduction last week which sent them bottom.
And things only got worse when their keeper saw red, a decision they will likely contend. And it big call, leaving them up against it for the remainder of the game.
But despite the result, Rooney can take pride in the effort and desire his team showed, matching a strong United team for much of the game, even with a disadvantage.
Man of the match
It would be easy to pick Sharp, as he bagged the winner, but former Leicester City winger Lawrence put in a solid individual display for the away side.
If anyone was going to score for County, it was going to be him, as he saw several efforts saved whilst it was 11v11, before forcing Olsen into some rare action when they were up against it.
And he was almost the hero with the last action of game, hitting the post deep in stoppage time. He is a talent that Derby are going to rely on to get them out of this mess they find themselves in.