Police secretly recorded 40-year-old Kamran Hussain last year giving sermons in which he told children that martyrdom was better than school.
Judge Rebecca Poulet said that Hussain preached "hatred and division" when she sentenced him today at London's Old Bailey courthouse.
Hussain claimed during his trial that he was exercising his right to free speech, but he was found guilty of supporting IS and encouraging terrorism.
The judge said the sermons represented a serious, persistent advocacy of terrorism.