Naveed Iqbal, 34, of Leven, was found guilty of attempted murder at Glasgow High Court on Friday, 3 November.
Lit bottles containing a flammable liquid were thrown through ground floor windows of two houses in the town on 28 March, 2017.
Seven people were in the house in Adrian Road and six people were within Alexander Road when the properties were set alight around 11:30pm.
A 16-year-old boy, who was within the house in Adrian Road, sustained non life-threatening burns to his chest and torso and was taken to St Johns Hospital in Livingston.
Iqbal was given the 16-year sentence at Glasgow High Court on Friday.
Detective Inspector Paul Dick of Glenrothes CID said: “A teenage boy has been left permanently scarred as a result of Iqbal’s actions which directly endangered the lives of 13 people, the youngest of which was a three-year-old girl.
“As a result of a thorough investigation which involved resources from CID, uniform officers and colleagues in forensics, Iqbal was identified as being responsible. CCTV proved invaluable in this inquiry, as did the support of the local community.
“Iqbal’s actions could have had catastrophic consequences. He risked the lives of two families, as well as those of the residents living nearby, and we welcome this outcome.”