The enshrined deity originally was enshrined in the Imperial Court, but when a major earthquake and the Tengyo War occurred in the capital, the shrine was transferred to the Kurama region in 940 under imperial decree by the Emperor of the time, Emperor Suzaku, and was commanded to guard the north.
祭神は元は宮中に祀られていたが、都で大地震・天慶の乱が起き、当時の天皇である朱雀天皇の勅により、天慶3年（940年）、鞍馬の地に遷宮をし、北方鎮護を仰せつかった。