The Australian, the champion in New York 12 years ago, had rolled back the years with a stunning win over Juan Martin del Potro and looked set to reach his first Grand Slam quarter-final for four years.
Hewitt led 4-1 in the fourth set only for Youzhny to win six straight games and lead by a break in the decider.
Back came 32-year-old Hewitt to lead 5-2 but he played a poor game serving for the match and Youzhny reeled off five straight games to clinch a 6-3 3-6 6-7 (3/7) 6-4 7-5 victory after three hours and 58 minutes.
Youzhny is only a year younger than Hewitt but the two veterans covered every inch of Louis Armstrong court, with the crowd being treated to some stunning rallies.
The Russian is a consistent performer at Grand Slams and has twice reached the semi-finals at the US Open - in 2006, when he beat Rafael Nadal, and 2010.