Ward, ranked a lowly 855 in the world, caused a major shock by beating Russia's Teymuraz Gabashvili, a player ranked 679 places higher, to secure his place in Friday's main draw.
But Willis, who thrilled the Wimbledon crowd 12 months ago, fell at the final qualifying hurdle when he crashed out in straight sets to Illya Marchenko of Ukraine.
The 26-year-old came through six qualifiers last year before thrilling the Centre Court crowd when he met seven-time champion Roger Federer in the second round.
Willis, ranked 374 in the world, had already accounted for world number 148 Andrej Martin and compatriot Liam Broady this week at Roehampton.
But, struggling with a knee injury after an awkward fall, he found world number 117 Marchenko a step too far and lost 6-4 6-1 7-6 (7/4).
With Derbyshire teenager Jay Clarke and Hemel Hempstead's Katy Dunne also bowing out at the Bank of England Sports Centre, it was left to the unlikely figure of Ward to keep the British flag flying.
The 27-year-old from Northampton has suffered with injures of late, but came through a big-hitting contest 6-7 (3/7) 6-4 7-6 (8/6) 6-1 to land a coveted Wimbledon spot.
The victory was all the more remarkable as Ward had lost in pre-qualifying last week, only to receive a wildcard to compete in the qualifiers.
"I've never won a match before in qualifying, before this I had lost four times," said Ward, whose only previous Wimbledon appearance was a loss to David Goffin in round one last year - again following a wildcard invitation.
"It just feels amazing, pretty unbelievable. I didn't even get through pre-qualifying! I thought that was it but they found two more wildcard spots and gave me one, so it really is unbelievable.
"I played Wimbledon last year but since then I had six months off with a problem with the tendons in my wrist. It was pretty serious but in the end I had an injection and calmed it down.
"I came back at the end of January, but since then I've been on a six or seven-match losing streak!
"But I came here and just got better and better, and something has just clicked. It's come together for the best tournament."
For Willis, it seems his story last year has been equalled, or maybe even usurped, given that Ward is even lower ranked than his compatriot was - 772 - when he faced Federer.
"I'm happy for Alex," said Willis. "He's obviously good enough, I don't know what he was doing in pre-qualifying.
"That's the level he can play at, it's the level a lot of us can play at, and he deserves to be in the main draw.
"I was playing on adrenaline. The knee's not great, but I finished the match and I did my best.
"He's a very good player but it would have been nice to have played him when I was 100 per cent."