New Delhi: England lost three wickets in an over to slip to 42-4, then 57-6, but got to 142-7 thanks to a 33-ball stand of 57 between Moeen Ali and David Willey.
Willey then removed Mohammad Shahzad in the first over of the Afghan reply.
From there, regular wickets meant Afghanistan were never in the chase, eventually falling away to 127-9.
It meant Afghanistan, the only side outside of Test cricket left in the competition, missed out on recording their first win over one of the game's major nations.
As for England, they avoided the sort of upset that would have ranked alongside defeats by Ireland, the Netherlands (twice) and Bangladesh (twice) in recent World Cups and World T20s.
Eoin Morgan's men will definitely reach the last four if they beat Sri Lanka on Saturday and South Africa are beaten by West Indies on Friday.
In all, Afghanistan bowled 16 overs of spin, with six of England's wickets falling to the slow bowlers.
Off-break bowler Nabi and 17-year-old leg-spinner Rashid conceded only 17 runs from their respective spells of four overs, while England went through a spell of 42 deliveries in which they scored just one boundary.
Moeen had no choice but to rebuild, first in the company of Chris Jordan, then with Willey.
After a period of slow accumulation that looked to have England well short of a competitive total, Moeen and Willey finally launched their attack in the 19th over, bowled by slow left-armer Amir Hamza.
Moeen heaved a slog sweep for six and flat batted four down the ground, before Willey found huge maximums straight and over the leg side.
With 25 off that over going towards a total off the final three, England had a score they could defend if they bowled well.
Despite the shift in momentum, Afghanistan still posed a threat in the shape of explosive opener Shahzad, only for Willey to trap him in front with an inswinger from the third ball of the innings.
Jordan and Willey each struck once more to leave Afghanistan 13-3 after three as England's bowlers, poor in the opening games against West Indies and South Africa, put in an improved display.
Liam Plunkett, in the side for Reece Topley, caused discomfort with his pace and bounce, his figures of 0-12 the third-most economical by an England bowler who has completed four overs in a T20.
In the end, it was not close, but the margin of victory did not reflect how near England were to another embarrassment.
Brief scores
England - 142 for 7 (Ali 41*, Mohammad Nabi 2-17, Samiullah Shenwari 2-17)
Afghanistan - 127 for 9 (Shafiqullah 2-35, Rashid 2-18)
Result - England won by 15 runs
Points - England 2, Afghanistan 0
MOM - Moeen Ali (England)