Bairstow was untroubled until on 90, and insight of his eighth one-day international century, he chipped a return catch to Afghanistan captain Gulbadin Naib.
A visibly annoyed Bairstow walked off having been in command during a 99-ball innings that featured eight fours and three sixes.
England were then 164 for two in the 30th over, with Bairstow and Yorkshire team-mate Joe Root having put on 120 for the second wicket — their fourth century stands at this level.
Root, who hit an unbeaten century in England’s eight-wicket win against the West Indies last week, was 45 not out
Earlier, James Vince, only playing after regular opener Jason Roy was ruled out with a torn hamstring, fell for 26 when he mishooked paceman Dawlat Zadran to Mujeeb Ur Rahman at short fine-leg.
It was the latest example in his chequered England career of Vince, who hit three fours in his 31-ball innings, batting attractively without making a substantial score.
But with Roy’s injury set to keep him out of England’s match against Sri Lanka at Headingley on Friday as well, Vince may get at least one more chance to impress.
Afghanistan held England to 46-1 off the first 10 overs — their lowest powerplay total so far this World Cup.
But England, bidding to win the trophy for the first time, upped the tempo in a match in which captain Eoin Morgan, fit following a back spasm, opted to bat first after winning the toss on a sunny day.
Rank-outsiders Afghanistan, yet to win a game at this tournament, helped England with some woeful outfielding that saw needless runs conceded.
Naib rang the changes with his bowlers but, until he struck himself, it made no difference to Bairstow, with even leg-spin star Rashid Khan dismissively pulled for a four and six in three balls by the England opener.