Ironically it was bad light that ultimately saved Australia, in a match where weather conditions may have cost them a victory of their own.
England needed just 21 to win from four overs when play was abandoned at 7.35pm.
The home side were 5-206 after Australian captain Michael Clarke set them 227 to win from 44 overs in a bold declaration.
Mitchell Starc had just run out Ian Bell (17 from 17) when umpires Aleem Dar and Kumar Dharmasena thrust their light-meter to the sky and determined it was too dark to continue.
It was a frustrating way for such a dramatic match to end, but it was consistent with bad light decisions earlier in the match and earlier in the series when Australia bore the brunt while pushing for a win at Old Trafford.
Robbing an irate full house of a memorable finish may prompt the ICC to change their rules on putting bad light solely in the hands of umpires.
Pietersen smashed 62 from 55 balls to lead the charge, but he was ably supported by Jonathan Trott (59 from 87) and then Bell and debutant Chris Woakes (17 not out from 13) at the death.
It was a fitting series finale in front of a packed house in London set up by the positive captaincy of Clarke.
Australia looked set to lose the unloseable Test, as Pietersen smashed the fastest half century by an Englishman in an Ashes Test.
However, Australia's bowler of the series Ryan Harris and impressive debutant James Faulkner (six wickets for the match) came to the rescue, dismissing danger men Pietersen and Trott.
When the South African-born pair's brilliant 77-run stand came to an end with David Warner executing a well-judged catch of Pietersen off Harris in the deep, England's task got a whole lot tougher with 64 runs needed from just 9.5 overs.
However Bell and Woakes smashed a quick-fire 36, and England were destined to win if bad light hadn't intervened.
Australia were badgering the umpires to call time for several overs, with Starc delaying proceedings as much as possible in the fifth-last over before eventually running Bell out by trapping the ball and shying at the stumps.
Starc then gave Bell a foul-mouthed send-off.
Clarke deserved credit for his captaincy, but if the attacking tactics had backfired, Australia would have gone down as the worst Ashes side to have toured England.
Losing 4-0 would have been a crushing blow for a side that had dominated the Test and continued to search for a win even when rain had wiped out day four.
Clarke couldn't avoid his winless streak as captain stretching to nine Tests - the worst run since Allan Border's 1985-86 side went 14 matches without victory.
However, he did escape going down as only the third skipper in history to lose a Test in which he'd declared twice.
If an entire day hadn't been lost to rain, the tourists may well have won.
Clarke inspired a heart-stopping finale to the series, in a match that appeared dead and buried as a contest.
After their deliberate go-slow batting performance on day three, England finally responded to Clarke's positivity and came to the party.
Australia declared their second innings at 6(dec)-111, giving England 44 overs to chase down the tricky but achievable target.
It was a situation tailor-made for Pietersen, and he stepped up to the plate with a superb innings.
Australian wicketkeeper Brad Haddin broke Rod Marsh's record for most dismissals ever in a Test series (29).