The shogun was an eighth-century office, originally designed to quell the northern barbarians such as the inhabitants of Ezo (Hokkaido), hence known as Sei-i-taishogun (Barbarian Subduing Generalissimo). This post became important as the highest authority within the bakufu, which contained delegated powers of military and judicial authority. This power was delegated by the Emperor.
Minamoto Yoritomo was appointed to this post in 1192. Although the post existed previously, Yoritomo is considered the first powerful shogun as the emperor was basically forced to give Yoritomo the title of shogun due to Yoritomo's military power. However, Yoritomo does not appear to have emphasized this office. After his death and the rise of the Hojo regents, this position increased in importance as the symbolic head of the Kamakura bakufu, even though the shogun remained aloof from judicial matters and affairs of the governance.
During the late thirteenth and early fourteenth centuries, the post of shogun was reserved for court nobles or princes of imperial blood. With the downfall of the Kamakura bakufu in 1333, Ashikaga Takauji started laying claim to the post again, and was appointed shogun in 1338 (the Ashikaga or Muromachi bakufu). Nevertheless, he continued the princely tradition of remaining aloof from the actual governance-save for enacting prayers and granting rewards. He delegated judicial and administrative powers to his brother Tadayoshi.
Takauji's grandson Yoshimitsu resigned from the post of shogun at a young age, and relied on more courtly authority. The last Ashikaga shogun who attempted to rule directly was assassinated in 1441, and for the ensuing one-hundred and thirty years, shoguns of the Ashikaga bakufu came to wield little administrative power. This time period became known as the Warring States Period.
Eventually the Ashikaga were eliminated completely in the late sixteenth-century by Oda Nobunaga, the first of the three great unifiers of Japan. However, Nobunga and his successor, Toyotomi Hideyoshi declined to take the title of shogun. It was not until in 1603 that the third unifier of Japan, Tokugawa Ieyasu, took the title of shogun and for the first time in over 160 years did the shogun have supreme power in Japan.