Sajid Javid, then the home secretary, removed her British citizenship shortly afterwards, and the government has used the same powers against dozens of alleged Isis members to prevent their return to the UK.
Ms Begum’s lawyers challenged the decision, accusing the government of making her stateless and exposing her to the risk of death or inhuman and degrading treatment.
They appealed to the Special Immigration Appeals Commission (SIAC) but it ruled the move lawful and said Ms Begum had not been made stateless in February.
On Thursday, the Court of Appeal granted Ms Begum permission to launch a judiciary review against that decision.
Ms Begum currently lives in Al-Roj camp, the north eastern Syrian refugee camp she was moved to after being first discovered last year.
According to a member of the camp’s security forces, the now 20-year-old is “very happy” that she has been allowed to return to Britain but is concerned “about what will happen to her and how people will look at her there”.
“She is in a good mood because she will see her family and her country again. But everything is very uncertain,” the security personnel told The Daily Mail.
The Kurdish authorities holding Ms Begum have repeatedly called for the UK to repatriate her and other Isis members.
In the full judgment made by the Court of Appeal, Lord Justice Flaux said national security concerns over Ms Begum “could be addressed and managed” in the UK.
“If the Security Service and the director of public prosecutions consider that the evidence and public interest tests for a prosecution for terrorist offences are met, she could be arrested and charged upon her arrival in the UK and remanded in custody pending trial,” he added.
The Home Office moved to immediately block the effect of what it called a “very disappointing decision by the court”.
“We will now apply for permission to appeal this judgment, and to stay its effects pending any onward appeal,” a spokesperson said.
Tom Hickman QC, representing Ms Begum, previously told the court she had no “fair and effective means of challenging the decision to deprive her of her British citizenship”.
“The only things that are clear are that Shamima Begum was a child when she left the UK and had been influenced to do so,” he added.
Sir James Eadie QC, representing the Home Office, said the fact that Ms Begum could not fully engage in the appeal procedure was “a result of her decision to leave the UK, travel to Syria against Foreign and Commonwealth Office advice and align with Isis”.
Ms Begum was nine months pregnant when a journalist found her in northern Syria last year, and her baby son later died. She said two children she previously had with Isis fighter husband Yago Riedijk had also died.
Of more than 900 people who travelled to Syria and Iraq from the UK, an estimated half have returned but only about 40 were successfully prosecuted.