O'Connor agreed to repay the money to the foundation in a deal to defer prosecution. She also agreed to receive treatment for her gambling addiction.
The former mayor was married to Robert O. Peterson, who was the founder of the Jack in the Box restaurant chain, from 1977 until his death in 1994. Before his death, Peterson had helped create the R.P. Foundation.
According to court documents, O'Connor won more than $1 billion while gambling at casinos in Las Vegas, Atlantic City and San Diego between 2000 and 2009. Her game of choice was video poker. But she lost even more, incurring "large, outstanding gambling debts at a number of different casinos."
Her net gambling losses topped $13 million from 2001 to 2009, the lawyer said. To stay afloat, O'Connor liquidated her savings, sold numerous real estate holdings and auctioned valuable personal items. She also got second and third mortgages on her personal residence in La Jolla.
Her lawyer said her personal fortune once totaled as much as $50 million, but now, she was virtually broke.
O'Connor was elected to the City Council when she was 25 and became San Diego's first female mayor in 1986.
On Thursday, O'Connor walked across the courtroom with a cane, appearing frail and struggling to maintain composure. At a news conference later, she said she always intended to repay the foundation and appeared to blame her behavior on a brain tumor that was diagnosed in 2011.
"There are two Maureens - Maureen No. 1 and Maureen No. 2," said O'Connor. "Maureen No. 2 is the Maureen who did not know she had a tumor growing in her brain."
O'Connor could face a maximum sentence of 10 years in prison if convicted on one count of engaging in monetary transactions in property derived from unlawful activity.
The Associated Press contributed to this report.