Shōgun, roughly "barbarian-subduing great general"/"generalissimo") was a Japanese military title for leaders from the warrior nobility of the samurai from the 12th century until 1867. Originally, a Shōgun was roughly equivalent to a European duke and was appointed to this position, which carried special powers, only temporarily in emergencies when fighting the emishi. After the end of the Heian period, Minamoto Yoritomo succeeded in having this title hereditarily transferred to him by the emperor in 1192.
The Shōgunat initially referred only to the household, later also to the administrative apparatus of the Shōgun. In Japanese, it referred to itself as kōgi ( literally, official affairs, i.e., "central government"); from the 19th century onward, it was referred to as bakufu (literally, tent government in the sense of "military government") as a distinction from the imperial court, which was increasingly seen as sovereign. The bakufu remained the country's dominant political center until the defeat of the Tokugawashogunate in the Boshin War in the course of the Meiji Restoration in 1868, when it was abolished, along with the state of the estates that had existed until then.
Until the 5th century AD, the nobility in Japan was only a loose association of soil-dominating clans. In the 6th century, the central imperial power of the Tennō granted hereditary titles of status to some of the clan heads. The actual authority of the clan chiefs was thus delegated and legitimized by the state.
In the 7th century, in the course of the establishment of the strongly Chinese-influenced Ritsuryō system, the nobility criterion of birth was replaced by administrative ability. By provincial law in 701, the nobility of birth was replaced by a merit nobility of civil officials (kuge). Under the leadership of this merit nobility, which was increasingly concentrated in the capital Heian-kyō (now Kyōto), associations of landed warriors and estate administrators from the provinces increasingly displaced the civil nobility from power until about 1200. The so-called sword nobility (Buke, especially samurai, Daimyō, Shōgun) then ruled Japan until 1868, leaving the Tennō with only high priestly, culture-preserving, and legitimizing duties. In 1884, in the Meiji Restoration by (or at least on behalf of) the imperial power, civil nobility and sword nobility were combined into a unitary nobility (Kazoku), and the samurai rank as such was abolished. By the law of July 7, 1884, the nobility was graded into five classes according to the British peerage system, but Chinese titles were used for them. Unlike the rule in force in China, it was hereditary indefinitely according to the principle of first-born, so that the younger sons of a titled nobleman were without nobility predicate throughout their lives and the heir during the lifetime of their father. After World War II, the nobility as an institution was eliminated by the 1946 Constitution. Only the imperial family itself remained.