Alcaraz had been set to lead Spain and clash with rival Novak Djokovic, named in Serbia's team, whom he beat in a thrilling Wimbledon final in July.
Medvedev now meets Djokovic on Sunday as the 36-year-old Serbian star once more goes in search of a record-equalling 24th Grand Slam title to crown his return to world number one next week.
The victory leaves the 20-year-old Alcaraz firmly on course for another final showdown with 23-time Grand Slam champion Djokovic after their Wimbledon classic in July.
Alcaraz's win keeps him on track for a repeat quarter-final against Italy's Jannik Sinner, a year after the two men duelled in an epic five-hour five-setter.
Defending champion Alcaraz eased into a last 32 meeting with Britain's Dan Evans after dispatching South Africa's Lloyd Harris 6-3, 6-1, 7-6 (7/4) in 2hr 28min on the Arthur Ashe Stadium show court.
World number one Alcaraz held on for a 2-6, 7-6 (7/4), 6-3 victory over Hurkacz, while world number two Djokovic beat Germany's Alexander Zverev 7-6 (7/5), 7-5 to reach the final.
Alcaraz overcame two rain delays totalling 2 hours, 35 minutes and 14th-seeded American Tommy Paul, who beat him last Friday in Toronto, for a 7-6 (6), 6-7 (0), 6-3 win in a match that lasted 3 hours.
"I realize I didn't play well in all of these matches," Alcaraz said. "All I can do now is practice to be better.
Alcaraz needed five match points to advance over Hurkacz and flirted with disaster as he let a 5-2 lead in the final set slip into a second consecutive tiebreak.
Wimbledon has a new champion. The world of men’s tennis has a new figurehead.
Living up to expectations is never easy, and so much has been expected of Alcaraz. Somehow, he is living up to all the hype.
The 20-year-old from the small town of El Palmar in Spain hit the jackpot at Madrid in 2022 when he became the only man to defeat both Nadal and Djokovic at the same clay-court event.
The 20-year-old Spaniard surpassed Djokovic 1-6, 7-6(6), 6-1, 3-6, 6-4 to win his first Major on grass
It was a second major for the 20-year-old Spaniard following his US Open title last year as he became Wimbledon's third youngest men's champion.
Djokovic is attempting to equal Roger Federer's record of eight titles at the All England Club and match Margaret Court's all-time mark of 24 Grand Slam crowns.
Djokovic will attempt to equal Roger Federer's mark of eight Wimbledon titles and Margaret Court's all-time record of 24 majors.
Alcaraz is No.1 in the ATP rankings and No.1 in the seedings at the All England Club and embraces that status. Every bit of it.
Top seed Alcaraz is seen as the biggest threat to Novak Djokovic, who is gunning for a record-equalling eighth men's title and 24th Grand Slam crown overall.
“Stay focused all the time,” Alcaraz said on court. “I knew I was going to have my chances.”
Djokovic has not played since collecting his men’s-record 23rd Grand Slam title at the French Open on June 11 and slid to No. 2.