During the Second World War he served as a soldier in Russia, but was dismissed from military service as incurably ill due to a severe
dysentery.[2] He spent the end of the war in 1944/45 in
Tengen at Lake Constance. In 1946 he was assigned
lecturer of
music history at the
Musikhochschule Freiburg, a position he held until 1958. In 1954 his
habilitation qualified him as private lecturer of
musicology at the University of Freiburg im Breisgau, where he was appointed extraordinary professor in 1962. Between 1955 and 1956 he also held a
visiting scholar position at the
University of Basel. In 1963, Hammerstein accepted the call for a full professorship in musicology at the
Ruprecht-Karls-Universität Heidelberg, which he held until his [retirement] in 1980
Hammerstein, who expanded the field of musicology to include
iconography, married Dr. Irmgard Hueck, born in 1943, with whom he had three children. He died in 2010, at the age of 95, in Freiburg im Breisgau. One of his brothers is the historian
Notker Hammerstein.