It found however that the young woman, who was not publicly named and did not appear at the court hearing, is allowed to continue teaching older vocational students in a Berlin public secondary school.
The ruling, which was still subject to a possible appeal, was expected to impact a wider debate on the issue on Germany, where rules on the hijab headwear differ between the 16 federal states.
German national law bans all civil servants from covering their faces, including with Muslim niqabs and burkas -- except for health and safety reasons, such as fire-fighters wearing breathing masks.
But there is no nationwide ban on civil servants wearing the Muslim hijab headscarves, and many states weigh the tension between freedom of religion and civil servants' neutrality rules on a case-by-case basis.
The predominantly Catholic state of Bavaria recently ordered Christian crosses, which already hang on walls in schools and courtrooms, to also be fixed in the entrances halls of state administration buildings.