Agha Salman dropped Stokes off spinner Abrar Ahmed with the English captain on 22 and just 19 needed for victory.
With nine wins in their last 10 matches, England have vindicated their newly adopted freewheeling approach to Test cricket dubbed "Bazball", after the nickname of coach Brendon McCullum.
McCullum and Stokes took charge of a misfiring side in May that had won just one of their previous 17 Tests, including a 4-0 humiliation in the Ashes in Australia.
England played power-packed cricket right from the start of the Pakistan tour, smashing 506-4 to set a record for the most team runs on the opening day of a Test.
Four batters -- Zak Crawley, Ollie Pope, Harry Brook and Duckett -- scored hundreds that day, another record.
Stokes was also bold in his captaincy, setting a tantalising 343-run target for Pakistan in Rawalpindi and then setting unusual fields to get wickets.
Pakistan's problems were compounded by injuries to their fast bowlers, with Shaheen Shah Afridi ruled out before the series with a knee injury.
Haris Rauf and Naseem Shah missed the last two Tests with fitness problems.
But Pakistan suffered major batting collapses, losing their last six wickets for 108 in the first innings in Karachi and seven for 52 in the second.
Tuesday's defeat means it is also the first time Pakistan have lost four home Tests on the trot, having been beaten by Australia in Lahore in March.