The regional court in Cologne, western Germany, ruled that the "fundamental right of the child to bodily integrity outweighed the fundamental rights of the parents", a judgement that is expected to set a legal precedent.
"The religious freedom of the parents and their right to educate their child would not be unacceptably compromised, if they were obliged to wait until the child could himself decide to be circumcised," the court added.
The case was brought against a doctor in Cologne who had circumcised a four-year-old Muslim boy on his parents' wishes.
A few days after the operation, his parents took him to hospital as he was bleeding heavily. Prosecutors then charged the doctor with grievous bodily harm.
The doctor was acquitted by a lower court that judged he had acted within the law as the parents had given their consent.
On appeal, the regional court also acquitted the doctor but for different reasons.
The regional court upheld the original charge of grievous bodily harm but also ruled that the doctor was innocent as there was too much confusion on the legal situation around circumcision.
The court came down firmly against parents' right to have the ritual performed on young children.
"The body of the child is irreparably and permanently changed by a circumcision," the court said. "This change contravenes the interests of the child to decide later on his religious beliefs."