Special Judge S Santhosh Kumar awarded the sentence after convicting her under various sections of the Unlawful Activities (Prevention) Act and Indian Penal Code.
The NIA special court in Ernakulam also imposed a fine of Rs 25,000 on her.
Zahid, who hailed from Bihar, is the second accused in the case investigated by the NIA.
Last year, the National Investigation Agency (NIA) had filed the charge sheet against two ISIS operatives Abdul Rashid Abdulla as the main accused, who motivated a number of youths from Kasaragod to leave India along with their families to join the Islamic State, and Yasmeen Mohammed Zahid.
Zahid was intercepted while trying to take a flight to Kabul to join the IS in Afghanistan.
There are 15 accused in the case. The NIA had chargesheeted only two as the 13 others including first accused, Rashid, were in Afghanistan and one in Syria.
Three are believed to be killed in air strikes in Afghanistan.
The agency had said the case relates to the criminal conspiracy hatched within and outside India by certain youths, originally hailing from Kasaragod district of Kerala, with the intention of furthering the objectives of ISIS and their pursuant exit from India along with their families for joining and supporting the terror organisation.
The case was re-registered at the NIA police station, Kochi, on August 24, 2016.
A probe by the NIA has established that Abdul Rashid Abdulla was the main conspirator, who motivated a number of youths from Kasaragod to leave India along with their families to join the Islamic State.
He conducted classes in Kasaragod and other places in support of the terrorist organisation and "its ideology of violent jihad", the agency had said.
Abdulla motivated one more set of 14 co-conspirators, including another accused Yasmeen Mohammed Zahid, to join the proscribed organisation and plan for "Hijrah to the Caliphate" announced by the ISIS, it had said.
The NIA said the probe revealed that the conspiracy had been in operation since July, 2015.
It said Zahid was intercepted at the New Delhi International Airport on July 30, 2016 when she was trying to leave India for Kabul along with her minor child to join her co-conspirator Abdulla in the territory under the control of IS in Afghanistan.
The probe has established that Abdulla had raised funds for the IS and transferred the money to Yasmeen, who utilised it for her activities with the intention of supporting the terrorist organisation.