Matsudaira Hirotada, the former chief of Okazaki Castle and the father of Tokugawa Ieyasu, was assassinated by his vassals in 1549. His body was buried at the Gekkoan Temple. Ieyasu was 8 years old at the time and was taken as a hostage by Oda Nobunaga to the city now called Nagoya.
After Ieyasu’s father died, he was transferred to the Imagawa Clan. On his way to the Imagawa Clan, he visited his father’s tomb at the Gekkoan Temple. Then, he planted a small Japanese pine tree on his father’s tomb and wished for the revival of the Matsudaira Clan (his family’s clan).
After Imagawa Yoshimoto died, he was released as a hostage and so he moved into the Okazaki Castle where his father used to live. He also decided to build a new temple for his father and hold a memorial service. Since the tree he planted answered his wish by freeing him and allowing him to revive the Matsudaira Clan, Ieyasu named the temple “Shououji” (in Japanese Kanji, 松 “Shou” represents a Japanese pine tree and 應 “Ou” represents answer). Since its creation, the temple has been considered very important and throughout the Edo period, Tokugawa Ieyasu and many other shoguns worshipped there.