The home team held on to claim a three-run win that squares the seven-match series 2-2, but only after control of the game swung like a pendulum.
England were favourites as they began chasing a gentle target of 167, but found themselves struggling at 14 for three after just two overs.
Liam Dawson appeared to have settled things in their favour when he dashed 24 off the 18th over to leave just nine needed off 12 balls, but Pakistan took the last three wickets in a hurry to come out on top.
The concluding act saw number 11 Reece Topley and Adil Rashid attempt a crazy single with four balls left in the match, inviting the inevitable run out as the moment got too much.
“Obviously with nine to get and three wickets left, we feel we should win, but pressure happens,” captain Moeen said.
“Both teams bowled really well and they just managed to get over the line. It was an amazing game of cricket, it went both ways and it kept swinging.
“We felt should have chased that down, we’re disappointed we didn’t but we did lose a lot of wickets up top. We kept hanging in there. The way Daws batted was just brilliant. He had a brilliant game.
“I’m really pleased for him but sad he couldn’t get us over the line. These things happen.”
Moeen had earlier been one of three middle-order batters who threatened to get England back in front, with his rapid 29 complementing counter-attacking knocks of 33 and 34 by Ben Duckett and Harry Brook.
In the end, though, none could match Mohammad Rizwan’s determined 88 for longevity.
England’s head coach Matthew Mott hailed Dawson, who had a previous top score of 10 in the format and finished with 34 at a strike-rate of 200, for making a fight of things when the heat was on.
“Taking wickets in the powerplay put us on the back foot, it took a really good partnership to get us back in it,” he said.
“Liam’s knock was special. It took everyone by surprise, we didn’t think in our wildest dreams we’d get in that position. It just shows in T20 cricket you’ve never got it done.
“Haris Rauf was put under pressure (in the 19th over) and he bowled his side to victory.”
After four sold-out games in Karachi, with a total attendance of around 140,000, the series now heads for Lahore, where the teams will resume battle on Wednesday.
England came out on the wrong side of a rollercoaster finish as Pakistan squared the Twenty20 series with a thrilling three-run win in the fourth match in Karachi.
The tourists were in the process of messing up their pursuit of a modest target of 167 when Dawson made a brilliant late intervention to make them firm favourites.
Coming in at number eight with a top score of just 10 in T20 internationals, he blasted 24 off Mohammad Hasnain in the 18th over to leave just nine required off 12 balls.
But it was Haris Rauf’s turn to flip things on their head, having Dawson caught for 34 with five still needed then smashing debutant Olly Stone’s off stump for a golden duck.
England had just one wicket left to get over the line and lost their cool, Rashid and Topley setting off for a crazy single that left the latter run out, the game over and the series tied at 2-2.
The tourists will be kicking themselves not just for the chaotic manner of the conclusion but also the earlier lack of composure as they got into trouble chasing a meagre total.
Mohammad Rizwan had showed the way with what proved to be a match-winning hand, carving out a hard-working 88 as Pakistan made 166 for four, but none of the England line-up were able to match his diligence.
Duckett and Brook continued impressive trips with middle-order knocks of 33 and 34 respectively, but the top order failed and there was too much still to do at the death despite Dawson’s best efforts.
Phil Salt was a man in a hurry, getting the chase off to a lively start with two boundaries from the first three balls, only to be caught off the fourth.
That brought Alex Hales and Will Jacks together, but the pair were rounded up in Hasnain’s first over. Hales was superbly caught by Usman Qadir, but Jacks bagged a duck after letting one skid into middle stump.
At 14 for three, England had dug themselves a hole. Duckett began the rebuild, dashing four fours in the space of five deliveries, but his good work would have been forgotten had Brook gone cheaply a few seconds later.
Instead he was put down horribly by Mohammad Nawaz on four after offering a gimme off Rauf.
Duckett was lbw to his favourite sweep shot with the game still in the balance but as long as Brook and Moeen Ali were together there was a chance.
When they took 19 off the 10th over, both launching Nawaz for six into the crowd, the equation was now in their favour at 85 off 60 balls.
Neither Brook nor Moeen could take it deep, though, and by the time David Willey was cleaned up by Rauf, the momentum was with Pakistan.
With 33 required off the last three overs, Dawson made his move – clubbing six over extra-cover and manipulating the field expertly with boundaries off each of the next four balls.
He deserved to be there at the end, but one under-hit pull shot cost him and his side as the late drama unfolded.
Pakistan’s batting performance was uneven and curiously paced, with just one wicket lost in the first 18 overs and three more in the last 10 balls.
Of the three sixes they managed, two came off the bat of Asif Ali in a three-ball burst at the end of the innings.
But with Rizwan holding court in the middle for all but four balls, it was enough to get the job done.
He dominated an opening stand of 97 with Babar Azam, who holed out off Dawson after facing just 28 of 71 legal deliveries, and continued to keep the scoreboard moving as the middle order failed to fire.
England were lacking the 97mph rockets supplied by the rested Mark Wood two days earlier, with Stone an adequate replacement but no more.
Rashid’s accuracy was their trump card, with his four overs costing just 27, and Topley took two wickets at the death, including Rizwan.