Officials gave little details about the case but one of the suspects was confirmed as a Tajikistan national.
The arrests were made in pre-dawn raids on Saturday in western and southern parts of Germany.
Prosecutors said the suspects were arrested for allegedly plotting a “serious, state-endangering crime.”
Local media reported that they were sympathizers of the Daesh Takfiri terrorist group.
However, a prosecution spokesman later said that the suspects had been released after no evidence of a cache of weapons or explosives was found.
Germany has been the scene of several terrorist attacks claimed by Daesh in recent years, including a 2016 truck attack on a Berlin Christmas market.
The incident took place in December 2016 when a truck plowed into a popular Christmas market packed with tourists as well as local shoppers, killing 12 people outside the Kaiser Wilhelm Memorial Church near Berlin’s Zoo station.
Daesh claims responsibility for the deadly attack on a Christmas market in Germany.
“One of our soldiers carried out the Berlin operation in response to appeals to target citizens of coalition countries,” said the group in a statement published on the Daesh-linked Amaq news agency.
The terrorist move came months after Daesh claimed responsibility for an attack on people in southern Germany, saying the attacker, believed to be a Syrian refugee, was a recruit fighting for the Takfiri group.
Daesh claims responsibility for the deadly attack by a Syrian refugee in Germany’s Ansbach.
Germany is not directly involved in the US-led coalition purportedly fighting Daesh but it has backed the coalition’s airstrikes in Syria.
Authorities across Europe are also on high alert for terrorist attacks since the New Zealand mosque attack two weeks ago.
At least one gunman has killed 49 people and wounded more than 20 during Friday prayers at two New Zealand mosques.
A gunman killed 50 people during March 15 prayers at two New Zealand mosques in the country’s worst ever mass shooting, which Prime Minister Jacinda Ardern condemned as terrorism.