Tareena Shakil, 26, has told the Birmingham Crown Court jury that she only wanted to live under Sharia law and feared she would go to hell if she lived in England.
The court was told before she left the UK she had talked on Facebook to a man named Fabio Pocas, whose online profile showed an armed man posing with the black flag of ISIS.
She said: "He told me 'You cannot live in a state that is not under Sharia'.
He said 'Look sister, by staying in England, you're hanging over the gates of hell. If you die that's where you're going'.
More From This Section
"The impact on me was fear - any Muslim would want to save themselves from hell, it's just how you go about it."
She flew out of the UK in October 2014 with her child, telling her family she was going on a package holiday to Turkey.
Shakil, who claims she escaped from Syria, was repeatedly asked about tweets she had sent in the weeks before setting off.
In September, she tweeted Sally Ann Jones, who travelled to Syria and is thought to have married British extremist Junaid Hussain, who was killed in a US drone strike last year.
Shakil claims she thought Jones was just "an ordinary woman".
"I didn't know who this woman was nor had I read any of the disgusting things she said online. It was only after, when interviewed by police, that I found out who she was and what she had said," she said.
The trial is ongoing and expected to last a few weeks.