The accused, Hans Lipschis, was found to be suffering from early-stage dementia and short-term memory loss and to be unfit to follow complex court proceedings, the court said.
The new findings had raised "considerable doubt that the accused is fit to stand trial," said the court in Ellwangen in southwestern Baden Württemberg state.
"Therefore the likelihood of a conviction that would require continued detention can no longer be assumed," it said in a statement, ordering his "immediate release".
The court argued that – given his state, according to psychiatric experts – Lipschis would not be able to follow the complex and lengthy case or launch a defence strategy.
Lithuanian-born Lipschis lived in Germany after the war, then emigrated to Chicago in 1956 but was deported back to Germany in the 1980s for having failed to reveal his SS past.
He was arrested last May over having served for years at Auschwitz, on charges his duties "supported the operation of the camp and thereby the extermination activities".
Prosecutors accused him of having aided and abetted "insidious and cruel murders".
Lipschis has reportedly claimed in the past that he worked as a cook at Auschwitz-Birkenau, the camp in Nazi-occupied Poland where more than one million people, mostly European Jews, perished from 1940 to 1945.
The Nazi-hunting Simon Wiesenthal Center this year listed Lipschis as its fourth most-wanted Nazi.
For more than 60 years German courts only prosecuted Nazi war criminals if evidence showed they had personally committed atrocities, but since a 2011 landmark case all former camp guards can be tried.
In that year, a Munich court sentenced John Demjanjuk to five years in prison for complicity in the extermination of more than 28,000 Jews at the Sobibor camp, where he had served as a guard.
The German office investigating Nazi war crimes has this year sent files on 30 former Auschwitz death camp personnel to state prosecutors with a recommendation to bring charges.