In 874, a Buddhist monk Shobo, who is known under his posthumous name of Rigen Daishi (the Great Master of Holy Treasures), built a hermitage to which Kannon (Avalokitesvara) statues of Juntei and Nyoirin were dedicated on the top of the Kamidaigo mountain where he discovered a well of the spiritual water named Daigo through an inspiration from a local god Yokoo Daimyojin. This is the origin of Daigoji temple. After a while pious supports of Emperor Daigo (897-930), Suzaku (930-46), and Murakami (946-67) contributed to development of Daigoji temple complex. In 907, for instance, the Yakushi hall was constructed to fulfill the imperial wish of Emperor Daigo. The temple complex of Kamidaigo (the upper part of Daigo) was completed by construction of the Godai hall. Consequently a plan of the Shimodaigo (the lower part of Daigo) complex was carried on. The Sakyamuni hall built in 926 and the five-storied pagoda built in 951 were consisted of the prototype of the Shimodaigo temple complex.
Since then Daigoji has played an important role as a main temple of Shingon school Ono branch in a history of Japanese Buddhism. Moreover, it might be worthwhile to note that many politicians in power have had a close family relationship with this temple. For instance, the linage of Minamoto Toshifusa, called Daigo Minamoto family, were the heads of this temple for many generations. Minamoto Toshifusa is known for having seized power instead of Fujiwara family in the late Heian period. When his son Shokaku was the head of the temple, the temple complex of both Kamidaigo and Shimodaigo was more developed and the Sanboin was constructed in 1115. From his time on Daigoji temple had enjoyed its prosperity. However, Daigoji temple suffered from several fires. The fire especially caused by Onin and Bunmei wars in Kyoto city destroyed the Shimodaigo complex except the five-storied pagoda. It is fortunate that nowadays we can see the pagoda built in 951. In Kamidaigo complex the Juntei hall is well known as the eleventh place of the pilgrimage in the Western part of Japan and the Godai hall is as the center of the Godai-san faith.