Police in the state of Brandenburg said the teenager was detained in the county of Uckermark, northeast of Berlin, after they learned he had sent a message to family members saying farewell and that "he had joined the jihad," or holy war.
"Evidence of the planning of a concrete act has not yet been identified during the police investigation," police said in a statement.
The state Interior Ministry's office identified the suspect as a Syrian. The teenager, whose name wasn't released, came to Germany in 2015 as an unaccompanied minor and registered as an asylum-seeker.
German security officials have repeatedly warned that the country is in the crosshairs of international terrorism groups. In December, a Tunisian citizen attacked a Berlin Christmas market, killing 12 people and injuring dozens.