After being reduced to 5-39, Afghanistan fought back to reduce the gap the defeat to 15 runs by finishing 127 runs for the loss of nine wickets. England had posted 142 runs for the loss of seven wickets.
Shafiqullah remained unbeaten at 35 not out, hitting four boundaries and two sixes in his 23-ball knock to be the top scorer for Afghanistan.
Samiullah Shenwari scored 22 runs.
Adil Rashid and David Willey took two wickets each for England.
Riding on Moeen Ali unbeaten knock, England posted 142 on the scorecard.
Afghanistan's Mohammad Nabi andRashid Khan took two wickets.