Without providing any details, Klein said in a statement he is leaving "to seek new challenges." As a political appointee of President Clinton, Klein faced replacement after the November presidential elections.
"My five and a half years at the division have been extraordinarily gratifying, but the time has come to seek new challenges," he said. "I have done what I set out to do here, and our work is on the right track."
Some legal experts praised Klein's tenure and said his departure will not have much effect on the Microsoft case, which is in the appeals process.
"This is pretty normal stuff. I think Klein stayed on the long side for people that do the job, and I think he's made an imprint," said Andy Gavil, an antitrust professor at Howard University Law School.
"He's clearly one of those heads of the division that came in with purpose and showed leadership," he said. "He took on some tough cases and handled them very well. It's the last stretch of an administration, so it's a pretty logical decision for him to want to do something else."
At the close of regular trading, Microsoft shares gained $1.94, or 3 percent, to $65. Since reaching a 52-week high of $119.93 in December, the shares have lost nearly half their value.
A. Douglas Melamed, who served as Klein's principal deputy throughout his nearly six-year tenure, will assume the post of acting assistant attorney general.
Melamed is a 55-year-old graduate of Yale and a 1970 graduate of Harvard Law School. Before joining the Department of Justice in 1996, he practiced law for 25 years at Wilmer, Cutler & Pickering, a prestigious Washington law firm.
Melamed has also served as a visiting and adjunct professor at the Georgetown University Law Center, where he taught torts and antitrust.
No other event has marked Klein's tenure as much as the case against Microsoft. But how the prosecution will ultimately be remembered depends on the outcome of the appeals process now underway.
U.S. District Judge Thomas Penfield Jackson in June ordered the breakup of Microsoft after determining that the company improperly leveraged its monopoly in the market for PC operating systems to harm rivals in other markets.
The trial marks Klein's second battle with Microsoft while at the Justice Department.
Under his leadership, the department in 1997 unsuccessfully prosecuted Microsoft for violating a 1994 consent decree that changed how the company licensed software to PC makers. The government contended that bundling Internet Explorer with Windows 95 violated the spirit of the decree.
Jackson agreed, and in December 1997 he issued a preliminary injunction compelling Microsoft to separate the Web browser from the operating system.
But a few months later an appeals court overturned the injunction and sharply criticized Jackson.
Within weeks, a determined Klein stood alongside attorney general Janet Reno and representatives of 20 states in Washington, D.C., presenting a new case charging Microsoft with antitrust violations.
Klein drafted veteran trial attorney David Boies to lead the case, turning a bitter enemy into an ally. Boies had earlier thwarted the Justice Department in its unsuccessful 13-year antitrust prosecution of IBM.
No other decision in the case may have been more important, say legal experts.
"Microsoft's attorneys simply weren't prepared for Boies' scrappy courtroom theatrics," said Bill Kovacic, an antitrust professor at George Washington University Law School.
Boies' relentless assaults cast doubt on the credibility of Microsoft's witnesses, in part because of his effective use of email evidence. In one instance, Boies caught Microsoft in a gaffe involving video evidence that appeared to be doctored.
Boies now represents Napster, a music-swapping Web site that is defending itself against the music industry in a high-profile copyright infringement case.
While Klein's departure is not unexpected, the timing is surprising: As early as next week and as late as Oct. 2, the Supreme Court is expected to decide on jurisdiction in Microsoft's appeal.
At issue is whether the case warrants direct appeal under the Expediting Act, which would bypass the local appellate court. Since a 1974 revision, only cases of national significance are considered under direct appeal. If the high court leaves jurisdiction with the U.S. Court of Appeals for the District of Columbia Circuit, that would be a potentially devastating event for the government.
"The appeals court is a better venue for Microsoft, and the (Justice Department) knows this," said Bob Lande, a professor at University of Baltimore Law School.
Whether the Supreme Court hears the case at this time or not, Klein's departure is not expected to have any immediate effect.
"Klein's resignation will have no real impact on the Microsoft (case)," said Hillard Sterling, an antitrust attorney with Gordon & Glickson in Chicago. "Klein was clearly a force during the trial, but that's a done deal. As the case moves up the appellate ladder, Klein's role is essentially irrelevant."
Klein isn't the first high-profile departure in the case. Just after closing arguments were completed last year, Stephen Houck left the New York state attorney general's office. Houck led the states' case but played a more behind-the-scenes role, not garnering the same attention as Boies.
Responding to Klein's resignation, Reno applauded Klein for leading the antitrust division to a "remarkable record of accomplishments during this time of historic change in the global economy."
"Joel Klein has been a champion for America's consumers. He has fought tirelessly for marketplace competition, and Americans have enjoyed better products, more choices and lower prices as a result," Reno said in a statement. "He has been on their side all along, and I am so grateful he's been at my side for the last five years."
Iowa Attorney General Tom Miller said, "Klein has been one of the best antitrust chiefs in the nation's history. He will be remembered for many remarkable decisions and actions taken under his leadership, and particularly for the courage and vision he demonstrated in the Microsoft antitrust case."