There is a written record that during the Tengyo era (938-947), Tansho, the chief priest of Horyu-ji Temple and member of Sugawara clan, first enshrined SUGAWARA no Michizane before a priest named Keiyu constructed the main building of the shrine in 1324.
天慶年間に法隆寺の管主で菅原氏の湛照が創祀し、元亨4年（1324年）に僧・慶祐が社殿を造営したとの記録がある。