The exact date of the foundation of Gyokusen-ji is uncertain, but temple records indicate that it was originally a Shingon sect hermitage converted to the Sōtō Zen sect in the Tenshō period.
The current Hondō was built in 1848, but soon after its completion it was commandeered by the Tokugawa shogunate for use as a residence for foreign visitors to Shimoda during negotiations to end Japan's national isolation policy. It hosted officers from American Commodore Matthew Perry’s flotilla of Black Ships, and Japanese authorities allowed the bodies of dead American sailors to be buried in its graveyard. Soon afterwards, it became the residence for a delegation of Russians under Vice-AdmiralEuphimy Vasil'evich Putiatin, who was trapped in Shimoda at the end of 1854 when a tsunami caused by the Ansei-Tōkai earthquake destroyed his fleet. The temple was used during the second and third series of negotiations between the Tokugawa shogunate of Japan, and the Russian Empire, which resulted in the Treaty of Shimoda of 1855. After the Treaty of Kanagawa theoretically opened Japan to the outside world, a group of American merchants landed in Shimoda and unsuccessfully attempted to open trade relations – an issue which had not yet been settled by treaty. This group resided at Gyokusen-ji after the departure of the Russians until the arrival of Townsend Harris, the first American Consul General to Japan in 1856. The temple has preserved the rooms used by Townsend Harris and Henry Heusken as the “Townsend Harris Museum”, with documents, ukiyo-e, and manikin doll dioramas describing the temple during the Bakumatsu period.
Foreign cemetery
Five Americans and three Russians who died in Shimoda in the 1850s are buried in the temple cemetery. The five Americans buried at Gyokusen-ji are recorded as:
John D. Storm, USN fireman serving on the USS Powhatan
Alexander Doonan, US Marine serving on the USS Mississippi
Other memorials
Harris remained in residence at the temple for two years and ten months. During his stay, Harris requested that the Japanese provide him with both milk and beef. Gyokusen-ji today has a monument decorated with the image of a cow, which the temple claims to mark the site where the first cow to be slaughtered in Japan for human consumption was killed. Its English language sign reads:
"This monument, erected in 1931 by the butchers of Tokyo, marks the spot where the first cow in Japan was slaughtered for human consumption. ".
Other memorials include a commemoration of the temple as the birthplace of Japanese milk production, and another commemorating the visit of President Jimmy Carter in 1979.