Victory at Old Trafford saw favourites England go ahead of holders Australia to sit top of the World Cup group table on net run-rate.
Morgan’s six-hitting spree in his career-best 148 set the tone for England’s team total of 25 sixes, which was also a new ODI innings record.
The Dubliner’s innings, which featured 118 runs in boundaries, was all the more impressive as Morgan had been doubtful for this match with a back spasm suffered in England’s win over the West Indies, in which he could not bat.
“I’m getting quite old, running around with a bad back, I never thought in my wildest dreams I’d produce an innings like that!” Morgan said.
“I had an extremely bad back after the last game but our medical staff have done wonders with medication and extensive treatment. I have pretty much been living with the physio.
“It was a special day. It’s the World Cup. We’re loving playing in it. On the big stage, it is nice to do.”
Morgan’s masterclass was the centrepiece of England’s 397-6.
That was the highest total of the tournament so far and the largest England had made at any World Cup, surpassing their 386-6 against Bangladesh in Cardiff 10 days ago.
Even though bottom of the table Afghanistan, suffering their fifth defeat in five matches, posted their highest World Cup total of 247-8 they were never up with the required run-rate.
“We are where we want to be. The next two or three games are pretty crucial,” Morgan said of England’s World Cup hopes.
“We want to bring our level of intensity to every game. Making that a priority is important to us.”
Hashmatullah Shahidi completed a gutsy 68-ball fifty on his way to 76, while his fourth-wicket stand of partnership of 94 with Ashgar Afghan (44) was a record for any Afghanistan wicket at a World Cup.
Earlier, Morgan, dropped on 28, dominated a third-wicket stand of 189 with Joe Root (88), whose contribution to their partnership was a mere 43.
Afghanistan star leg-spinner Rashid Khan set an unwanted record with 0-110 in nine overs — the most expensive return at a World Cup and second costliest in all ODI cricket.
Morgan’s tally surpassed the record of 16 sixes in an ODI innings previously shared by India’s Rohit Sharma, South Africa’s AB de Villiers and West Indies’ Chris Gayle.
He broke the record when he launched Gulbadin Naib for a flat straight hit over the Afghanistan captain’s head.
But the very next ball saw Morgan hole out off Naib to end a 71-ball innings that also featured four fours.
Jonny Bairstow had got England off to a solid start, with England accelerating after James Vince fell for 26 when he mishooked paceman Dawlat Zadran to short fine-leg.
In sight of his eighth ODI century, Bairstow’s 99-ball innings ended when he chipped a return catch to Naib.
Morgan, after an early mix-up that saw him sent back and get tangled up with opposing skipper Naib, settled in quickly.
He hit Naib for two sixes including a fine drive over long-on.
But the left-hander should have been out when he skied Rashid, only for Zadran at deep midwicket to make such a mess of the catch that the ball bounced out of his hands and over the rope for four.
Root was denied a second successive hundred and third of the tournament when he holed out off Naib, whose 3-68 was a creditable return in the circumstances.
But the sixes kept coming, Morgan’s 11th bringing up a hundred in 57 balls, with only Ireland’s Kevin O’Brien, Australia’s Glenn Maxwell and South Africa’s AB de Villiers having scored faster centuries at a World Cup.
England set the ODI team record for sixes when Moeen Ali launched the penultimate delivery of the innings, from Zadran, over long-on.