Hakodate Magistrate’s Office was a government office established by the Tokugawa shogunate as an important center for the defense and administration of Japan’s northern frontier. Today, the reconstructed building stands at the heart of Goryokaku, the distinctive star-shaped fortress in Hakodate.
The original office was initially located at the foot of Mount Hakodate. After Goryokaku was constructed as a fortified compound surrounded by a water moat, the government buildings were moved inside the fortress. The new Hakodate Magistrate’s Office was completed in 1864.
Hakodate’s history changed dramatically in the mid-19th century. In 1854, Commodore Matthew Perry arrived in Japan, leading to the signing of the Convention of Kanagawa between Japan and the United States.
Under the agreement, the ports of Shimoda and Hakodate were opened to American ships. This marked the end of Japan’s more than two centuries of national seclusion and the beginning of its opening to the outside world.
As foreign ships, including heavily armed warships, began entering Hakodate, the Tokugawa shogunate recognized the need to strengthen the defense of the port. Goryokaku was therefore constructed using European-style fortress techniques.
The fortress features a distinctive five-pointed star surrounded by a water moat, with a single crescent-shaped outwork known as a ravelin. The Hakodate Magistrate’s Office and other buildings were constructed inside the fortified enclosure.
The Hakodate Magistrate’s Office served as the administrative center of the shogunate in northern Japan. Its location inside Goryokaku reflected the dual role of the complex as both a government center and a defensive stronghold.
The original building was completed in 1864, but its period of operation was remarkably short. Only four years later, the Tokugawa shogunate collapsed, bringing the political system that had created the office to an end.
After the fall of the shogunate, the office was taken over by the new Hakodate government administration. However, the political transition soon led to armed conflict.
During the Boshin War, Japan’s largest civil war between forces supporting the new Meiji government and those loyal to the former shogunate, Hakodate became the site of the final major battle.
Former shogunate forces occupied Goryokaku, using the fortress as their headquarters. Government warships subsequently fired artillery from Hakodate Harbor toward Goryokaku, and shells struck the Hakodate Magistrate’s Office.
The former shogunate forces eventually surrendered, and Goryokaku was handed over to the new government. The historic magistrate’s office was dismantled in 1871, only seven years after its completion.
Although the original building disappeared, its history was not forgotten. Researchers carefully studied old photographs, written records, and historical architectural drawings to determine the building’s original appearance and structure.
Based on this extensive research, the Hakodate Magistrate’s Office was reconstructed and opened to the public in 2010. The restoration allows visitors to experience a building that had existed for only a brief period during one of the most transformative eras in Japanese history.
Walking through the restored Hakodate Magistrate’s Office offers a vivid introduction to the dramatic changes that took place in Japan during the 19th century. The building connects the opening of Hakodate to foreign trade, the defensive construction of Goryokaku, the fall of the Tokugawa shogunate, and the Battle of Hakodate.
Its setting inside the unusual star-shaped fortress makes the experience especially distinctive. Visitors can explore the reconstructed government office and then step outside to appreciate the geometric layout of Goryokaku that was designed according to European fortification principles.
Hakodate Magistrate’s Office is one of the most important places in Hakodate for understanding the transition from feudal Japan to the modern Meiji era. The reconstructed architecture, combined with the surrounding fortress and its turbulent history, provides a powerful sense of the events that shaped modern Japan.
For travelers interested in Japanese history, military architecture, and the final years of the Tokugawa shogunate, the Hakodate Magistrate’s Office is an essential stop when exploring Goryokaku.
April - October: 9:00 a.m. - 6:00 p.m.
November - March: 9:00 a.m. - 5:00 p.m.
December 31 - January 3
Other temporary closures may occur.
Adults 500 yen
Students and children 250 yen
Free for children before elementary school age
From Hakodate Station to Hakodate Magistrate’s Office
Tram: 18 min. walk from Goryokaku Koen-mae stop (approx. 40 min.)
Cab (about 15 minutes)