In May, Claude Létourneau, 50, was charged with several counts of aggravated assault, after DNA evidence taken from the syringes linked him to the needles.
He pleaded not guilty to the charges in June.
He returned to court in July to face additional charges of aggravated assault, theft and weapons possession. He faced a total of 32 charges.
Crown prosecutor Émilie Baril-Côté said Judge Conrad Chapdelaine took the man's criminal past into account in determining his sentence.
Chapdelaine said the needle incidents caused a "state of terror" in Sherbrooke before Létourneau's arrest.
A total of eight people have come forward saying they were pricked by needles and have undergone testing.
A few of those individuals had to undergo therapy, but results showed they were not infected with any disease.
Twenty-five needles have been found since January. The last needle was found on May 24 at The Bay in Carrefour de l’Estrie, a shopping centre in Quebec’s Eastern Townships.
Létourneau was arrested on May 31. He will remain in prison for another 42 months.
In June, police said bloody needles found in Lévis in 2002 were also linked to Létourneau.Suggest a correction