As depicted in the Tale of Genji set in the Heian period, the initial form was thought to be the shrine visits that the nobility made, which further transformed into Junrei to wish for a peaceful death through Jodo Shinko (belief of a pure land after death) such as the Kumano Sanzan (three shrines in Kumano) visits of the Cloistered Emperor Goshirakawa due to the spread of pessimism in a decadent age, and in the middle ages, Junrei were done by the ordinary public during the age of war and poverty.
平安時代の源氏物語に見られるような、貴族階級による願掛けを中心とした神社参詣がその初期形態ではないかとされ、その後仏教の末法思想の流行により、後白河法皇の熊野三山詣でなど浄土信仰を背景とした極楽往生を願う巡礼へと変化し、中世に入ると、戦乱や貧困の中で一般階級による巡礼も行なわれるようになった。