Posing as a fruit seller from Damascus, German army lieutenant Franco Albrecht, 28, had managed to gain asylum in his own country, obtaining a space in a shelter and monthly benefits of 409 euros ($485), even though he speaks no Arabic.
Investigators said Albrecht — who harboured far-right, anti-immigrant views — was plotting an attack that he planned to blame on refugees.
But Germany's Federal Court of Justice said “the results so far of the investigation do not substantiate the strong suspicion that a serious act threatening the state was in preparation.”
Albrecht, who still faces charges over his fictive life as a refugee, is free while investigations continue, the court said.
The soldier could not remain in police custody on grounds of possible flight risk, the court said, because he has been detained preventively since April 26 — a period that may have already covered any possible sentence over the charges he faces.
Albrecht's feat at obtaining asylum has illustrated the at times chaotic handling of more than one million asylum seekers who have arrived in Germany since 2015.
It has also underlined the anti-foreigner backlash and a spate of racist hate crimes that have plagued Europe's biggest economy since Chancellor Angela Merkel's decision to open Germany's borders.
Paying the political price for the refugee influx, Merkel was left without a majority in September's election and weakened by a rise of the far-right party AfD.
More than two months after the polls, the veteran leader is still struggling to form a government and stave off snap elections.