England overcame an almighty wobble to beat Pakistan in a pulsating final Twenty20 at Emirates Old Trafford and win the series 2-1.
Chasing 155 on a dry, turning pitch, England needed 61 from nine overs with eight wickets in hand after Jason Roy's 64.
In a dramatic penultimate over, Malan was bowled by Mohammad Hafeez, only for Liam Livingstone to hit his first ball for six then be caught off his next, leaving six required off the final over.
Although Morgan holed out with four needed, Chris Jordan got England over the line with two balls to spare.
England's own spinners were earlier at the fore, restricting Pakistan to 154-6. Mohammad Rizwan batted through the innings for 76 not out, but the tourists were shackled by Adil Rashid's 4-35.
The hosts end their white-ball summer with only one defeat from 12 matches against Pakistan and Sri Lanka, now moving on to a five-Test series with India which begins on 4 August.
Before then, English cricket takes a step into the unknown with the inaugural season of The Hundred, which starts on Wednesday with the opening match of the women's competition.
This was ideal preparation for the T20 World Cup in the United Arab Emirates and Oman starting in October.
Although the deafening atmosphere is likely to be very different to what England will experience at that tournament, to win a high-stakes game by completing a tense chase on a spinning pitch against a skilful attack is an examination passed.
From a position where they were coasting, England were plunged into tension by some questionable strokes and the nous of the Pakistan bowlers.
Captain Morgan looked to have the game won when he flicked two sixes off Hasan Ali's 18th over, yet vastly experienced off-spinner Hafeez dragged Pakistan back into it.
Malan was bowled trying to make room, and rising star Livingstone heaved his first ball over mid-wicket, then sliced to short third man.
Morgan skied a missed chance from the first ball of Hasan's last over and ran two, then was caught, only for the nerveless Jordan to take the required four runs from the next two deliveries.