Miller, 57, joined the Times in 1977 and was part of a team that won a Pulitzer Prize in 2002 for reporting on global terrorism. She said in a letter to readers that she left because she had "become the news." She had been negotiating a severance deal with the paper for several weeks.
Miller spent 85 days in jail over the summer for refusing to testify about her conversations with a confidential source. But after her release, she was criticized harshly and publicly by Times editors and writers for her actions in the CIA leak case and for her reporting during the run-up to the Iraq war, later discredited, indicating that Saddam Hussein possessed weapons of mass destruction.
"We are grateful to Judy for her significant personal sacrifice to defend an important journalistic principle," Times publisher Arthur Sulzberger Jr. said in a statement. "I respect her decision to retire from The Times and wish her well."
The Times declined to disclose details of the severance package, but said the paper had agreed to print a letter from Miller in which she defended herself and explained her reasons for leaving.
She said she could no longer function as a reporter at the paper, given her unwanted status as a news figure.
"I have chosen to resign because over the last few months, I have become the news, something a New York Times reporter never wants to be," Miller wrote, according to excerpts from her letter published Wednesday evening on the newspaper's Web site.
Even before her involvement in the CIA case, she added, she had "become a lightning rod for public fury over the intelligence failures that helped lead our country to war."
One of Miller's attorneys, Matthew J. Mallow, said Wednesday that she did not plan to take any other jobs until at least January, but hoped to continue to lobby for passage of a federal shield law that would protect journalists from having to reveal their sources.
"She and we are pleased that the terms of her departure from the New York Times were on a very amicable basis," Mallow said in a telephone interview.
Miller did not immediately respond to an e-mail or answer her telephone.
The paper had initially been publicly supportive of Miller, and waged a long and costly legal battle on her behalf after she refused to tell a grand jury about conversations she had with I. Lewis Libby, then chief of staff for Vice President Dick Cheney, about CIA operative Valerie Plame. Plame is the wife a Bush administration critic.
After Miller ultimately decided to testify, saying Libby had given her permission to do so, the Times ran an article depicting Miller as a rogue reporter who battled with editors and colleagues. In a subsequent staff memo, Times Executive Editor Bill Keller said Miller also appeared to have misled editors about her "entanglement" with Libby.
In response, Miller told the Times that Keller's memo was "seriously inaccurate," the newspaper said. It reported that in a memo to Keller, Miller wrote she "never meant to mislead Phil (Taubman), nor did I mislead him."
As for Keller's remark about "my 'entanglement' with Mr. Libby, I had no personal, social, or other relationship with him except as a source," Miller wrote.
Responding to Keller's memo, Miller's attorney, Bob Bennett, said: "I am very concerned now that there are people trying to even old scores and undercut her as a heroic journalist."
Miller, who did not immediately return to work for the Times after her release, told The Associated Press in a recent interview that she had been "terribly sad" about the rift.