A seven-member jury convicted Huang Nanhua, also known as Wong Siu-ming, of one count of carrying arms and ammunition with intent to cause an arrestable offence.
Huang was accused of plotting to shoot Lee and media mogul Jimmy Lai, both central figures pushing for democracy in the southern Chinese city.
He had pleaded not guilty to the charge, but admitted that he "had been instructed to come to Hong Kong to teach someone a lesson."
Lee is a founding member of the city's Democratic Party and a top barrister. Lai is chairman of Next Media, which runs newspapers and magazines in Hong Kong and Taiwan that are strongly critical of China's ruling Communist Party.
Both Lee and Lai were also at the forefront of the campaign to remember those who led the pro-democracy protests in Tiananmen Square in Beijing in 1989, which were brought to an end by a bloody military crackdown.
"I have no doubt that, at the least, Martin Lee was the object of criminal attention," Judge Peter Line said during Huang's sentencing.
"No court will know the motive of those who paid you, but common sense tells one that it must relate either to his politics or his profession."
"The criminal courts of Hong Kong will not tolerate men like you with guns at their side coming here to target such people to teach them a lesson," he added.
The judge said the starting point for the sentence was 12 years' imprisonment, and that he had opted for the longer jail term due to the gravity of the crime.
"Conduct such as yours injures us all. The public will not tolerate it. It is bound to attract such a deterrent sentence," he said.
The alleged shooting plot was foiled after an officer stopped Huang by chance at a police checkpoint in August last year, where he was found to have a homemade pistol and five rounds of ammunition in his bag.
The police also found Huang carrying papers with a photo and home address of Lai, details about restaurants where Lai and Lee had dined together, and even information about a traditional Chinese medicine doctor they had both seen.
But the prosecution said that it was unable to pinpoint for certain who was the target.
Lee testified that he did not believe the plot was linked to his years of pro-democracy campaigning.
"I do not believe my politics were anything to do with this matter," he told the court.
For his part, Lai said he had no personal or money problems and had not been in conflict with organised crime groups. The media tycoon said he did not believe that the Communist Party wanted to harm him.
The plot was discovered just before elections to Hong Kong's legislature last summer, but was not revealed until May this year.
Hong Kong has an outspoken and vibrant political culture, but violence against politicians is rare.