The firework, of a type that is illegal in the state of Berlin, landed five metres from the playground where the children were playing, and exploded with a loud bang. The children escaped injury.
The man testified that he had made sure to throw the firecracker far enough away so that none of the children would be injured. He said he regretted his actions.
He added that he had been exhausted after a night-time journey and had asked the children to keep quiet several times.
He also said the incident had occurred during a stressful time at work following an argument with his boss.
The Berlin court found the man guilty of misusing explosive material and sentenced him to three months in prison. The judge handed him jail time because the defendant was on probation and had 13 previous convictions.