It is said that the festival originated in 869 when Hiramaro URABE set up 66 hoko (long-handled Chinese spear) and sent three mikoshi (portable shrines carried in festivals), praying for the decrease in the overwhelming influence of the plague, to enshrine the Gozu Tenno, and have a goryoe (ritual ceremony to repose of souls).
一説には869年（貞観_(日本)11年）、疫病の猖獗を鎮める祈願を込めて、卜部日良麿が66本の矛を立て、神輿３基を送り牛頭天王を祀り御霊会を行ったのがその起源であるという。