The big-serving Ivanisevic fired 26 aces to book a semi-final against Pete Sampras - who survived an epic five-set contest with Alex Corretja of Spain - with a devastating all-round display that brought him a 6-3, 6-4, 7-6 win.
Edberg, who had disposed of the British No 1 Tim Henman in the previous round, put up a brave fight against the No 4 seed, saving four match-points before succumbing on the fifth, hitting a backhand half-volley into the net on Ivanisevic's return of serve to go down 11-9 in the tie-break.
The Swede, playing in his 54th successive and final Grand Slam tournament, reacted philosophically to his defeat as he prepared for the back courts of retirement. "I think everybody has his time," he said. "This is my 15th year on the circuit and I think I've played long enough. I've had some great years. I'll remember those.
"It is a special atmosphere when people get into the match here, all the noise and everything. I think that is what I will miss about it: being out on that court and having the crowd behind you and pushing you to the limit."
Sampras may struggle to remember anything about his match with Corretja. The American vomited on court in the middle of the fifth-set tie-break and looked likely to pass out. Somehow he summoned the strength to keep going, setting up a second match-point with his 25th ace.
He then coughed a sigh of relief as he watched the Spaniard double-fault to end one of the most dramatic matches in US Open history, 7-6, 5-7, 5-7, 6-4, 7-6. Corretja fell to his knees and Sampras slumped on to the net before they embraced each other amid a standing ovation for both players after the 4hr 8min struggle.
Moments after the match, Sampras hugged his girlfriend, Delaina Mulcahy. "This one was for Tim. Tim was there with me," he whispered to her, referring to his late coach, Tim Gullikson, who died in May.
Exhaustion led to dehydration and nausea for Sampras. Afterwards he needed two litres of intravenous fluid to revive him. "A lot of people saw things today that most won't see in a lifetime," Paul Annacone, Sampras's current coach, said. "Alex Corretja should get a lot of credit for what he did. What Pete did, there are no words. It was exhilarating to watch. The guy is pretty special, and special people do special things."
In the men's doubles, the top seeds Todd Woodbridge and Mark Woodforde of Australia fought back after losing the first set to beat the Dutch pairing of Jacco Eltingh and Paul Haarhuis, 4-6, 7-6, 7-6. America's Lisa Raymond and Patrick Galbraith won the mixed doubles title with a 7-6, 7-6 victory over Manon Bollegraf of the Netherlands and their compatriot, Rick Leach.