With 10 minutes to play Chris Lumsdon launched a 60 yard pass to Hawley's feet.
Hawley, without a goal in United's four straight defeats, shrugged off Alex Baptiste's challenge to loft a perfect lob over Kevin Pressman from the corner of the penalty area.
The collective sight of relief rang round Brunton Park - United's recent slump saw them drop from 2nd to 12th.
Carlisle may have left with the points but the match against the League bottom team was anything but a pretty affair.
Mansfield will need to improve to move off the basement and caretaker/manager Peter Shirtliff has a tough job on his hands.
But with better finishing the points would have been theirs. Striker Simon Brown was their chief threat and he could have easily had a hat-trick.
With 20 minutes gone Brown broke Carlisle's lacklustre offside trap only to hit the post from just eight yards.
Soon after that he robbed Cumbrian's captain Kevin Gray but fired straight at Keiren Westwood when well placed.
Then, with seconds gone at the start of the second half, he headed narrowly wide from Gareth Jelleyman's cross.
Raphael Nade had the home side's best chance, forcing a great save from Pressman.
United winger Simon Hackney beat two Stags defenders and curled a perfect cross on to Nade's head only for the veteran keeper to intervene with a full stretch save.
United should have scored after 55 minutes when Pressman flapped at Adam Murray's cross.
Hackney powered a volley into the net but referee Lee Mason blew for a free kick for Nade's challenge on the keeper.
In the end it was the Stags failure in front of goal that cost them the points, but Hawley's winner will live long in the memory of Carlisle fans.