Ashraf Islam, a prison-yard convert to Islam formerly known as Mark Townley, turned himself in to police in London in May, saying he planned to kill the British royal because he served in the nation's military and had "blood on his hands."
A subsequent search of his computer found Islam had researched Harry's travel schedule and a document outlining a plan to shoot him using a small caliber pistol from close range, the Mirror reported.
Judge Richard McGregor-Johnson called the plot "vague and unlikely to succeed" but said the electronic evidence showed Islam was serious about the plan.
"The examination of your computer revealed you conducted research on [Prince Harry's] whereabouts and intentions," the judge said. "You had given the matter considerable thought."
Islam, originally from Belfast, Northern Ireland, was previously convicted in an attempted robbery and converted to the religion while serving a prison term.