Stokes was handed the last over the match, with Sri Lanka needing 15 to win and captain Angelo Mathews on strike having hit a brutal half-century.
But Stokes showed the calmest head in Delhi, conceding just four runs with a measured display of full-pitched fast bowling in pressure-cooker conditions.
Mathews was equally deserving of a place on the winning side, having dragged his side back from the depths of 15 for four in pursuit of 172.
He finished with an injured hamstring that hindered his progress at the close and a fine knock of 73 not out in 54 deliveries.
England’s 171 for four was built around Jos Buttler’s brilliant 66 not out and 42 from Jason Roy at the top of the order.