"It has been a great privilege indeed to have served as a member of the court for 24 terms," the 75-year-old justice wrote President Bush in a one-paragraph resignation letter. "I will leave it with enormous respect for the integrity of the court and its role under our constitutional structure."
In a separate one-sentence statement, O'Connor cited her age and said she "needs to spend time" with her family. She and her husband, John, a former classmate at Stanford, have three sons.
President Bush, in a brief statement at the White House, praised O'Connor as "a discerning and conscientious judge and a public servant of complete integrity."
He offered no hints about a possible replacement but said he would make his choice in a "timely manner" so there can be a Senate vote before the next court term begins in October.
The White House said later that the president will not decide on a nominee before he returns from Europe on July 8.
The surprise announcement from O'Connor came amid widespread speculation that ailing Chief Justice William H. Rehnquist would step down. The 80-year-old Rehnquist has thyroid cancer and was absent from the bench during much of the court's just-completed session.
Rehnquist has offered no public clue as to his plans.
It's been 11 years since the last opening on the court, one of the longest uninterrupted stretches in history. O'Connor's decision gives Mr. Bush his first opportunity to appoint a justice and could lead to a nasty confirmation fight for the person he nominates.
"This is an earth shaker," said CBS News Correspondent Jim Stewart.
"This is the fight this town has been bracing for for a long time," Stewart said. "You can expect a major fight."
CBS News Legal Analyst Andrew Cohen said O'Connor's departure is "far more significant" than the conservative Rehnquist's would have been.
"She was the pivotal 'swing' vote on many of the most contentious issues of the day, from affirmative action to abortion rights, from campaign-finance reform to federal disability access law, from gay rights to the death penalty," said Cohen.
"Because of her centrist role on the court, she alone is probably more responsible for the laws and rules that govern more Americans than any other living citizen," he said.
Another prospective candidate is Edith Hollan Jones, a judge on the 5th U.S. Circuit Court of Appeals who was also considered for a Supreme Court vacancy by President Bush's father.
O'Connor's appointment in 1981 by President Ronald Reagan, quickly confirmed by the Senate, ended 191 years of male exclusivity on the high court.
She wasted little time building a reputation as a hard-working moderate conservative who emerged as a crucial power broker on the nine-member court.
O'Connor often lines up with the court's conservative bloc, as she did in 2000 when the court voted to stop Florida presidential ballot recounts sought by Al Gore, and effectively called the election for President Bush.
As a "swing voter," however, O'Connor sometimes votes with more liberal colleagues.
Perhaps the best example of her influence is the court's evolving stance on abortion. She distanced herself both from her three most conservative colleagues, who say there is no constitutional underpinning for a right to abortion, and from more liberal justices for whom the right is a given.
O'Connor initially balked at letting states outlaw most abortions, refusing in 1989 to join four other justices who were ready to reverse the landmark 1973 decision that said women have a constitutional right to abortion.
Then in 1992, she helped forge and lead a five-justice majority that reaffirmed the core holding of the 1973 ruling. Subsequent appointments secured the abortion right. Commentators called O'Connor the nation's most powerful woman, but O'Connor poo-poohed the thought.
"I don't think it's accurate," she said in an Associated Press interview.
O'Connor in late 1988 was diagnosed as having breast cancer, and she underwent a mastectomy. She missed just two weeks of work. That same year, she had her appendix removed.
For years, O'Connor had an involuntary nodding of her head, but said she never had it diagnosed. The movement, while not constant, was an up-and-down motion similar to that made by someone nodding in the affirmative.
O'Connor remained the court's only woman until 1993 when, much to O'Connor's delight and relief, President Bill Clinton appointed Ruth Bader Ginsburg.