The accused, Nils D., was suspected of "joining the foreign terrorist group Islamic State of Iraq and Syria," Germany's chief federal prosecutor Harald Range said in a statement.
Commandos raided the alleged jihadist's house in Dinslaken on Saturday, but could not find any concrete plans for possible terror strikes.
The possible "Islamic State" (IS) member was taken into custody following a tip by US secret services, who had earlier warned of possible terror attacks in Germany.
Nils D., who cannot be identified under German privacy laws, is thought to have traveled to Syria in October 2013 where he "joined the IS and took part in the terror organization as a member until his return to Germany in November 2014," the federal prosecutor's office elaborated.
A connection between Saturday's arrest and Wednesday's massacre at the offices of satirical magazine Charlie Hebdo in Paris could also not be established, according to officers.
Nils D. was known to German security agencies and had been under investigation since early 2014 on charges of "preparing for an act of terrorism jeopardizing the state."
mg/cmk (dpa, AFP)