The English top-order crumbled after Morgan chose to bat first on a tricky Delhi wicket, slumping to 57-6 with a series of careless dismissals.
But the innings, and ultimately the match, was rescued by an eighth-wicket partnership of 57 between Moeen, whose 41 not out was the top score of the match, and Willey, who finished unbeaten on 20.
That late blitz saw England post 142-7, enough for a 15-run win as Afghanistan were kept to 127-9.
The winning margin was close enough to suggest that had they not clubbed 44 from the final three overs, England could have been sitting on a defeat to rank alongside their losses to Holland in 2014 and 2009.
“It was a very important stand. To get us up to 142 Ali and Willey played really well,” said Morgan, whose own golden duck came in a spell of three wickets in five deliveries.
“The difference between chasing 120 and 140 is huge, and one of our strengths is that we bat right down the order.
“Where the rest of our batsmen struggled those two guys showed a great deal of application.
“We had to get a score on the board.
“I had a loo break when we were five or six down and thought about what sort of score we could get ... could we push 120-125 and then bowl brilliantly?
“But that 19th over of left-arm spin (from Amir Hamza) went for 25 and that went a long way.”
Moeen, who hit four fours and a six in his 33-ball stay, added: “We wanted to take it to the last three overs and try and have a bit of a hack at the end but it was tough because they bowled really well.
“The situation was probably better for me to try and take my time a little bit, and thankfully it came off.
“Today was about getting the job done against a good side and it was a tough game.”
When England dissect their efforts in the cold light of day they will surely reflect harshly on an error-strewn show from the top six, and one that was curiously ham-fisted when compared to their stunning chase against South Africa just five days ago.
Morgan suggested England’s planning and preparation had been up to scratch and was simply not replicated in the middle, though that seems a charitable reading of their travails in the first 10 overs.
In fact, England appeared caught cold by both the pitch and the Afghan spinners.
“This was the wicket every single one of us was expecting,” he contended.
“It was simply a matter of not adapting. We’ve been practising similar things that we needed here but just didn’t produce.
“The execution of our plans was off by a long way. But I think if we’d have been a bit tentative that would have been the wrong way to go.”