The origin of the temple has been told in relation to the Kataokayama kijin legend that described a story which happened in the winter of 613, namely that Prince Shotoku met a starving stranger in Kataokayama (Mount Kataoka) and gave him food and clothing.
この寺の創建については、推古天皇21年613年の冬、聖徳太子が片岡山で飢えていた異人に衣食を施したという片岡山飢人伝説にからめて語られる。