Borrowed from Japanese 函館 (はこだて, Hakodate), in turn possibly borrowed from Ainu ハㇰ チャシ (hak casi), meaning "shallow fort".
Hakodate