Ashraf Islam, 31, said he had a "moral right to judge" the royal because he disagreed with the work of the British Armed Forces, of which Prince Harry is a member.
The judge at Isleworth Crown Court in London described Islam's plot as "vague and unlikely to succeed", but said he presented a risk to the public.
Islam, of no fixed address, was handed a three-year jail term.
Islam pleaded guilty to making a threat to kill Prince Harry, at Uxbridge Magistrates Court in May last year.
He handed himself in to police and volunteered the information about the plot, defence counsel Roxanne Morrell said.
Judge Richard McGregor-Johnson said he would not go over details of Islam's plot.
But he said: "The examination of your computer revealed you conducted research on his (Prince Harry's) whereabouts."
He added: "You thought he and other serving officers had some moral guilt, and you thought you had a moral right to judge.
"I accept that there is nothing here that could be described as professional plans.
"Your plan was vague and unlikely to succeed."
But the judge said police would have intervened had Islam, who has previous convictions for dishonesty and for involvement in an attempted robbery, attempted to carry out his plan.
The judge said he considered a longer sentence, but said it would have been deemed "excessive".
"The authorities are clear, even if a court finds that the person does represent a danger to the public, that doesn't justify a longer sentence."
Ms Morrell, for Islam, said her client had a personality disorder.