Alonzo Knowles hacked email accounts, from the Bahamas, to steal the images and scripts, which he tried to sell.
Knowles used viruses and fake security notifications to obtain passwords.
He was caught when he travelled to the US to sell stolen scripts not knowing that he was meeting undercover police officers.
The US Department of Justice said Knowles had had a list of the email addresses and phone numbers of 130 celebrities, including actors, musicians and others, that he sought to steal from.
Knowles stole 25 unreleased film and TV show scripts as well as banking details and intimate images and videos.
In December 2015, law enforcement agencies were alerted to his hacking campaign by a radio show presenter who Knowles approached trying to sell one of the stolen scripts.
When contacted by undercover agents, Knowles boasted he had many more scripts to offer worth "hundreds of thousands of dollars".
One stolen script was for a biographical film about rapper Tupac Shakur, who died in 1996, called All Eyez on Me.
The sentence for hacking the accounts was more than double the usual amount, said Judge Paul Engelmayer, because Knowles had been shown to be "devoid of remorse".
Emails Knowles sent while in prison that were read in court revealed his plan to write a book exposing more of the secrets he stole.
This, said the judge, showed he was a "clear and present danger" who would probably commit the same crime again.
"You have some obvious facility for computers," said Judge Engelmayer. "But you chose to use your gifts for dark and lawless ends."
A hacker who stole sexually explicit videos and unpublished film and TV scripts from celebrities has been sentenced to five years in jail.