According to "Kojidan" (a collection of tales compiled between 1212 and 1215 by MINAMOTO no Akikane) and "Koke Shidai" (compiled by OE no Masafusa and one of the most valuable historical sources of detailed information about state ceremonial and public functions in the eleventh century), when an attempt was made to move the shrines during the relocation of the capital city to Heian-kyo in the year 794, a divine message was received stating that 'The kami should continuously be enshrined here to safeguard the emperor' so the shrines were kept in place and situated within the Imperial Household Department to guard the Imperial Family.
『古事談』『江家次第』などによれば、延暦13年（794年）の平安遷都の際に他所へ遷座しようとしたところ、「猶（なお）此の地に坐して、帝王を護り奉らむ」と託宣があったため遷座せず、皇室の守護神として宮内省に鎮座することになったという。