Tareena Shakil, 26, was found guilty by a court in Birmingham, central England of IS membership and encouraging terrorism in posts on Twitter before leaving Britain.
"You were well aware that the future which you had subjected your son to was very likely to be indoctrination and thereafter life as a terrorist fighter," Judge Melbourne Inman said.
Australian Islamic State recruiter reported dead
The court heard that Shakil was radicalised online and in October 2014 told her family she was going to Turkey for a beach holiday.
Instead, she crossed the border into Syria and went to IS stronghold Raqa.
"I left to build us all a house in heaven, Allah promised us heaven if we sacrifice our worldly life," she wrote in a message to a relative. "I'm not coming back."
Bombs kill 50, wound 100 near Syria Shia shrine
In Raqa, she was kept in a large house with other single women and posed with her son for a selfie while wearing a black balaclava branded with the IS symbol.
Other pictures found on her phone showed her posing with an AK-47 assault rifle and a hand gun.
However, Shakil found life under IS rules too strict.
In January 2015, after repeatedly looking up "I want to leave ISIS" on the Internet, she and her son travelled by road to the Turkish border.
They ran one kilometre to escape into Turkey, dodging a three-man IS patrol before handing themselves into the Turkish military, she told the court.
Saudi police arrest nine American 'terror' suspects
She was arrested when police boarded her flight home at London's Heathrow Airport last February.
During her trial, Shakil claimed she only travelled to Syria because she wanted to live under sharia law.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ