The indictment did not say specifically what was leaked but, from the dates and other details, it was clear that the case centered on leaks to Pulitzer Prize-winning journalist James Risen for his 2006 book, "State of War."
Risen's lawyer said he would not discuss whether Sterling was Risen's confidential source. The lawyer said that Risen did not provide investigators with any testimony or documents.
Sterling served on the Iranian desk at the CIA and handled Iranian spies who had defected to the United States.
According to the indictment, Sterling worked for the CIA from May 1993 to January 2002.
The indictment alleges that Sterling, who is a lawyer, signed various non-disclosure agreements in which he agreed never to disclose classified information to unauthorized persons.
"Through his alleged actions, Sterling placed at risk our national security and the life of an individual working on a classified mission," said Assistant Attorney General Lanny A. Breuer.
The Associated Press contributed to this report.