Four victims suffered severe injuries, among them a 13-year-old girl, in the bloody attack in March in the railway station of the western city of Düsseldorf.
The assault had sparked fears of a jihadist attack after December's truck attack on a Berlin Christmas market that left 12 people dead.
Police commandos with automatic weapons, body armour and balaclavas rushed to the station, backed by police helicopters.
The axe man, identified only as Fatmir H., ran away from police and was badly injured himself when he jumped off a four-metre bridge.
The mentally ill attacker, with a history of high anxiety and self-harm, had "heard voices" and hoped to be shot dead by police, the court was told.
The court's ruling that the man could not be found legally culpable was in line with the demands of prosecutors, the defence and co-plaintiffs.
The other victims were two female Italian tourists and another woman and five male commuters, all aged between 30 and 50.
Fatmir H. had come to Germany in 2009 and received residency rights "for humanitarian reasons".