The concept originated in gagaku court music, specifically in the ways in which elements of the music could be distinguished and described. Though eventually incorporated into a myriad of disciplines, it was most famously adapted, and thoroughly analysed and discussed by the great Noh playwright Zeami, who viewed it as a universal concept applying to the patterns of movement of all things.
Zeami, in his work "Sandō" (The Three Paths), originally described a five-part (five dan) Noh play as the ideal form. It begins slowly and auspiciously in the first part (jo), building up the drama and tension in the second, third, and fourth parts (ha), with the greatest climax in the third dan, and rapidly concluding with a return to peace and auspiciousness in the fifth dan (kyū).
This same conception was later adapted into jōruri and kabuki, where the plays are often arranged into five acts according to the same rationales. Takemoto Gidayū, the great jōruri chanter, was the first to describe the patterns or logic behind the five acts, which parallel as well the five categories of Noh which would be performed across a day.
He described the first act as "Love"; the play opens auspiciously, using gentle themes and pleasant music to draw in the attention of the audience. The second act is described as "Warriors and Battles" (shura). Though it need not contain actual battle, it is generally typified by heightened tempo and intensity of plot. The third act, the climax of the entire play, is typified by pathos and tragedy. The plot achieves its dramatic climax. Takemoto describes the fourth act as a michiyuki (journey), which eases out of the intense drama of the climactic act, and often consists primarily of song and dance rather than dialogue and plot. The fifth act, then, is a rapid conclusion. All loose ends are tied up, and the play returns to an auspicious setting.