Hachiman was widely worshipped as a god of war.
Hachiman shrine
Abbreviation of 八幡宮, referring to a shrine dedicated to Hachiman. Context usually makes clear that the shrine, not the deity or a place name, is meant.
See also: 八幡宮
At New Year's, I went to pray at the local Hachiman shrine.
Archaic adverbial use meaning something like “certainly” or “surely.” It is not a productive modern everyday use; learners are most likely to encounter it in old texts or explanations of old usage.
In old usage, 八幡 is used as an adverb meaning “certainly.”