The arson at the mosque in the town of Lauffen on Thursday night caused material damage before the imam managed to extinguish the blaze. There were no casualties.
Stuttgart prosecutors and local police said five people were being sought for attempted murder, AFP reported.
A joint statement said, "several Molotov cocktails were thrown into the mosque through an open window". adding that they were treating the incident as a possible racist or anti-Islamic attack.
Germany is home to some three million ethnic Turks. On Saturday the leader of the community, Gokay Sofuoglu, denounced the incident as an "inhuman crime" and an "act of terrorism".
There were 950 attacks in Germany last year on Muslims or places linked to Islam, according to the interior ministry.