the original temple was built in 1585 in osaka to console the spirit of the father of katō kiyomasa. the temple in osaka was moved to kumamoto castle in 1600 and the grave of katō kiyomasa, which is called jōchibyō was built in the present site of mount nakao in 1611. the temple in kumamoto castle was burned, and was moved to the present site considerably under the grave of katō kiyomasa in 1614. in 1871, the shinto shrine part grave was moved to kumamoto castle in the name of katō shrine under the policy of the separation of shintoism and buddhism. during the satsuma rebellion of 1877, the temple was partly burnt. later the temple and the grave were reconstructed. throughout the edo period and meiji period, the temple attracted many people from kumamoto for recreation.