It is said that Shakyamuni (Buddha) attained enlightenment while meditating under the Bodhi Tree. His Zen teachings were passed down through 28 generations before being inherited by the monk Bodhidharma, after which the Buddhist priest Dogen brought the Zen teachings of Bodhidharma to Japan.
Dogen established the Eiheiji Zen Monastery in what is now Fukui Prefecture, and his teachings were further developed to by the monk Keizan to create the Soto Zen Buddhism. Keizan established Daihonzan Sojiji Temple in modern-day Kanagawa Prefecture. Both of these became the head temples of Soto Buddhism. Ofuna-Kannon-ji is a branch temple directly affiliated with Daihonzan Sojiji and takes Kannon (the bodhisattva Guanyin/Avalokiteśvara) as its principal figure of worship.