Former office clerk Christopher Chaney, 36, said before the trial that he hacked into the accounts of film star Scarlett Johansson and other celebrities because he was addicted to spying on their personal lives.
Prosecutors said Chaney illegally gained access to email accounts of more than 50 people in the entertainment industry, including Johansson, actress Mila Kunis, and singers Christina Aguilera and Renee Olstead from November 2010 to October 2011.
Chaney, who was initially charged with 28 counts related to hacking, struck a plea deal with prosecutors in March to nine felony counts, including wiretapping and unauthorized access to protected computers.
"I don't know what else to say except I'm sorry," Chaney said during his sentencing. "This will never happen again."
Chaney was ordered to pay $66,179 in restitution to victims.
Prosecutors recommended a 71-month prison for Chaney, who faced a maximum sentence of 60 years.
Prosecutors said Chaney leaked some of the private photos to two celebrity gossip websites and a hacker.
Johansson said the photos, which show her topless, were taken for her then-husband, actor Ryan Reynolds.
In a video statement shown in U.S. District Court in Los Angeles, a tearful Johansson said she was "truly humiliated and embarrassed" when the photos appeared online, asking Judge S. James Otero to come down hard on Chaney.
Prosecutors said Chaney also stalked two unnamed Florida women online, one since 1999 when she was 13 years old.
Chaney, a native of Jacksonville, Florida, was arrested in October 2011 after an 11-month FBI investigation dubbed "Operation Hackerazzi" and he continued hacking after investigators initially seized his personal computers.
Shortly after his arrest, Chaney told a Florida television station that his hacking of celebrity email accounts started as curiosity and later he became "addicted."
"I was almost relieved months ago when they came in and took my computer ... because I didn't know how to stop," he said.
(Reporting by Eric Kelsey; Editing by Jill Serjeant and Andrew Hay)