O'Connor addressed the letter, published by the high court, to "friends and fellow Americans." In it, she said doctors have diagnosed her with "the beginning stages of dementia" and "probably Alzheimer's disease."
"As this condition has progressed, I am no longer able to participate in public life," she wrote.
Appointed to the bench by President Ronald Reagan in 1981, the 88-year-old retired justice has been living in Arizona since she left the bench in 2005.
"Not long after I retired from the Supreme Court 12 years ago, I made a commitment to myself, my family and my country that I would use whatever years I had left to advance civic learning and engagement," O'Connor wrote.
She started an online civics program, iCivics, eight years ago to teach basic civics principles to middle and high school students through interactive games.
"I can no longer help lead this cause, due to my physical condition," she wrote. "It is time for new leaders to make civic learning and civic engagement a reality for all. It is my great hope that our nation will commit to educating our youth about civics, and to helping young people understand their crucial role as informed, active citizens of our nation. To achieve this, I hope that private citizens, counties, states and the federal government will work together to create and fund a nationwide civics education initiative."
O'Connor's husband, John J. O'Connor III, had Alzheimer's and died in 2009. His illness contributed to her decision to retire from the Supreme Court, the New York Times reported.
While on the Supreme Court, O'Connor was known as a moderate Republican, who in her latter years on the bench was a swing vote on controversial social issues.
"I was saddened to learn that Justice Sandra Day O'Connor, like many Americans, faces the challenge of dementia," Chief Justice John Roberts said in a statement. "But I was not at all surprised that she used the occasion of sharing that fact to think of our country first, and to urge an increased commitment to civics education, a cause to which she devoted so much of her time and indomitable energy."
Prior to serving on the Supreme Court, O'Connor was the first woman majority leader in the United States, from 1972-1974, and a Phoenix trial judge. She had settled in Phoenix and set up a law practice there in 1957. She later served as an assistant state attorney general.
"Justice O'Connor is of course a towering figure in the history of the United States and indeed the world," Roberts wrote. "She broke down barriers for women in the legal profession to the betterment of that profession and the country as a whole.
"Although she has announced that she is withdrawing from public life, no illness or condition can take away the inspiration she provides for those who will follow the many paths she has blazed."