Edberg beat Henman 6-7, 7-6, 6-4, 6-4 in a three-hour match on the Stadium court at Flushing Meadow, ending the Oxford player's hopes of becoming the first British man since John Lloyd in 1984 to reach the quarter-finals.
Despite the defeat, Henman will have acquired many admirers in the match with a sustained level of top-class play, mainly from the baseline.
The opening set was very one-sided - in Edberg's favour - and it was remarkable that he did not win it. He broke Henman in the third game of the match and at 3-1 had two more break points.
But Henman is developing the habit of getting his first serve in on the big points, and he held on to narrow the gap to 3-2. That win proved crucial at 5-4, when Edberg played a bad game as he served for the set. In the tie-break, which Henman took 7-2, the Swede never recovered from dropping the first four points.
The second set started with a flurry of break points - 14 in the first five games, eight to Henman, six to Edberg - but neither player could convert. From then on the serve took over, and the second set also went to the tie-break, which Edberg won, causing Henman to lose his first set of the tournament.
Henman admitted after the match that the second set had been a turning point. "I think in the second he had the majority of the chances, but then if I had taken one of the break points in the first game of it maybe the momentum would have really swung my way."
After that Edberg took over. Although the third set went very much with serve, it was always the Swede who looked to have the better chance of breaking. Henman saved a break point at 2-2, but at 4-4 Edberg broke and served out the set.
The decisive moment came at the same point of the fourth set, but not before Henman had staged something of a fightback after dropping his serve in the first game.
He broke back for 2-2 with some inspired groundstrokes, but after holding his next service game he needed treatment on the left thigh muscle that had been strapped for two matches.
Although he said it did not affect the outcome, he struggled after that, held serve just once more, and effectively conceded defeat in the ninth game, which Edberg broke to love.
A philosophical Henman added: "I still think I can reflect on a very good tournament, another positive step in my career. Stefan's obviously at the end of his and hopefully I'm at the beginning of mine."
In another fourth-round match, Pete Sampras, the holder, took the sting out of Mark Philippoussis' serve, blocking back anything he could reach, to knock out the aggressive Australian.
Sampras lost the duel of aces 17-11 but won the match 6-3, 6-3, 6-4 with a masterful performance in every other phase of the game. "When you're going against a 134mph serve, you'd better have your game face on," Sampras said. "His service is so hard, you almost have to guess. You hope you get that one break-point."
In the women's quarter-finals, Monica Seles took just 48 minutes to crush Amanda Coetzer 6-0, 6-3. Seles now faces Spain's Conchita Martinez, the No 4 seed, and the player she defeated in last year's semi-finals.
"I don't think she's unbeatable at all," Martinez, who has lost all eight of her matches against Seles, said optimistically. Martinez fought off three set-points in a first-set tie-break, then cruised to a 7-6 6-0 victory over America's Linda Wild.