All Shintō music traces its origins to the myth of an erotic dance performed by the goddess Ame no Uzume no Mikoto before the Rock Door of Heaven to entice out the Sun Goddess, who was hiding her light from the world and causing crops to fail. Kagura, written with Chinese characters meaning ‘music (and dance) for the gods’, was regarded as a branch of wagaku, music of Japanese origin, as opposed to various kinds of foreign music being introduced at the court; by 773 ce, as Shintō came to be formalized, we hear of kagura musicians at the imperial court. The palace kagura, known as mi-kagura, seems to have originated as an all-night sacred banquet, with songs and a modicum of dance. This took place in the Seishodō (from 859), or the Naishidokoro (from 1002 to the mid-19th century), halls of the imperial palace. From the period 1074–6 it became an annual event, and a reduced version is still performed in mid-December (now in the Kashikodokoro). A slightly different version is performed for the shinjōsai (or niinamesai) festival in November, when the emperor commends new grain to the gods of Heaven and Earth. Mi-kagura songs have long been used also for functions at certain major shrines.
The cycle of songs (kagura-uta) was re-edited in the second quarter of the 17th century, after a hiatus caused by the civil wars of the 16th century. The complete repertory contains over 40 songs, but today only 12 are performed, in five groups, preceded by a short instrumental piece. Even so, a full performance occupies seven hours. The two songs of the second group, Torimono no bu, constitute the ritual core of the cycle, the later songs being regarded as lighter in character, relics of the old banquet tradition. Two (sometimes three) of the pieces have a separate section appended for a solo dancer (the ninjō). The text of each song falls into two parts, the moto-uta and the sue-uta; in each part the first verse is sung solo and the later verses in unison chorus. Instrumental accompaniment is provided by a Wagon (six-string zither), kagura-bue (transverse flute) and hichiriki (short cylindrical oboe). There are 20 singers in two groups, one for the moto-uta, one for the sue-uta. The lead singer in each group controls the pace of the performance with shakubyōshi (wooden clappers). The kagura-uta are in mostly free rhythm. The wind instruments play in unison, the wagon mostly playing simple arpeggio figures on open strings. The kagura-uta have a simple melodic structure, subtle in interpretation; only a single mode is used, based on the tone ichikotsu. In comparison to other Japanese singing, voice production is straight-toned and open. The notation is a system of neumes known as hakase, dating from the later 12th century. That used since the Meiji period is a reconstruction of this, the sumifu.
In addition to mi-kagura, music of the imperial cult includes other ancient song-types: Azuma asobi, Ōnaobi-no-uta, Yamato-uta, Kume-uta, Ta-uta and Gosechi-no-mai. In origin these are mostly secular court dances, though as dances some have fallen out of use. They may also be performed at major shrines, and Gosechi-no-mai, Kume-uta and Ta-uta have been used in enthronement ceremonies for the emperor.