She was born in Newport News, Virginia.
O'Leary worked as a prosecutor in the state of New Jersey after graduation from Rutgers University Law School and was later a partner in the accounting firm of Coopers & Lybrand. During the Jimmy Carter administration, O'Leary was assistant administrator of the Federal Energy Administration, general counsel of the Community Services Administration, and administrator of the Economic Regulatory Administration at the newly-created Department of Energy. In 1981, O'Leary established with her husband the consulting firm of O'Leary & Associates, serving as vice president and general counsel. From 1989 to 1993, she worked as an executive vice president of the Northern States Power Company. O'Leary was nominated to be Secretary of Energy in 1993 by President Bill Clinton.