The Kamakura shogunate was established by Minamoto no Yoritomo after victory in the Genpei War and appointing himself as Shōgun. Yoritomo governed Japan as military dictator from the eastern city of Kamakura with the Emperor of Japan and his Imperial Court in the official capital city of Heian-kyō (Kyoto) as figureheads. The Kamakura Shōguns were members of the Minamoto clan until 1226, the Fujiwara clan until 1252, and the last six were minor princes of the Imperial family. The Hōjō clan were the de facto rulers of Japan as shikken (regent) of the Shōgun from 1203. The Kamakura shogunate saw the Jōkyū War in 1221 and the Mongol invasions of Japan under Kublai Khan in 1274 and 1281. The Kamakura shogunate was overthrown in the Kenmu Restoration under Emperor Go-Daigo in 1333, re-establishing Imperial rule until Ashikaga Takauji overthrew the Imperial government and founded the Ashikaga shogunate in 1336.
Historically in Japan, the power of civilian government was primarily held by the ruling Emperor of Japan and their regents, typically appointed from the ranks of the Imperial Court and the aristocratic clans that vied for influence there. Military affairs were handled under the auspices of the civil government.
From 1180 to 1185, the Genpei War was fought between the Taira and Minamoto clans as part of a longstanding violent rivalry for influence over the Emperor and his court. Minamoto no Yoritomo defeated the Taira clan, but in his victory seized power from the civil aristocracy, politically relegating the Emperor and his court to symbolic figureheads. In 1192, Yoritomo and the Minamoto clan established a military government in Kamakura.
Yoritomo unexpectedly died in an accident in 1199, leaving the Minamoto clan weakened. Hōjō Tokimasa, the father of Yoritomo's widow, Hōjō Masako, and former guardian of Yoritomo, claimed the title of regent (shikken) to Yoritomo's son Minamoto no Yoriie, eventually making that claim hereditary to the Hōjō clan. At the same time, Hōjō Masako maneuvered herself into such a powerful, albeit informal, position that people began calling her the "nun shogun" in the place of her son Yoriie. As Minamoto no Yoriie grew older, however, he attempted to exert real power, resulting in a power struggle with his own mother. These conflicts caused considerable tensions within the shogunate. In 1201, the Jo clan unsuccessfully attempted to overthrow the Minamoto clan in the Kennin Rebellion. Eventually, Tokimasa deposed Yoriie, backed up his younger brother, Minamoto no Sanetomo, as a new shōgun, and assumed the post of shikken. Sanetomo was only twelve at this point, and accordingly power factually rested with his mother Hōjō Masako. The Minamoto remained the titular shōguns, with the Hōjō holding the real power. In 1204, loyalists of Yoriie attempted an uprising to topple the Hōjō domination, but the latter defeated the rebels and assassinated Yoriie.
In 1205, Hōjō Tokimasa attempted to depose Sanetomo, hoping to install his son-in-law as new shogun. However, his daughter Hōjō Masako saw this as threat to her own status; she arranged the pretender's murder and banished her father to a monastery. In 1219, Sanetomo was assassinated by his nephew Kugyō. Since Sanetomo died childless, the line of shōguns from the Minamoto clan ended with him. From this point onwards, the Hōjō were in total control. With Sanetomo's death in 1219, his mother Hōjō Masako continued to serve as the shogunate's real center of power. As long as she lived, regents and shōguns would come and go, while she stayed at the helm. Since the Hōjō family did not have the rank to nominate a shōgun from among its members, Masako had to find a convenient puppet. The problem was solved choosing Kujo Yoritsune, a distant relation of the Minamoto, who would be the fourth shōgun and figurehead, while Hōjō Yoshitoki would take care of day-to-day business. However powerless, future shōguns would always be chosen from either Fujiwara or imperial lineage to keep the bloodline pure and give legitimacy to the rule. This succession proceeded for more than a century.
As a result, the Kamakura shogunate rested on a unusual pyramid of regents and de facto usurpation: The true rulers, namely the Hōjō regents, had usurped power from the Minamoto, who had usurped it from the Emperor, descending from Emperor Kōkō, who usurped it from the children of Emperor Seiwa. At the same time, the regents, shoguns, and emperors all still maintained their nominal positions and existed alongside each other. The regime nonetheless proved to be stable enough to last a total of 135 years, 9 shōguns and 16 regents.
In 1221, Emperor Go-Toba tried to regain power in what would be called the Jōkyū War (承久の乱, Jōkyū no Ran), but the attempt failed. The power of the Hōjō remained unchallenged until 1324, when Emperor Go-Daigo orchestrated a plot to overthrow them, but the plot was discovered almost immediately and foiled.
The Mongols under Kublai Khan attempted sea-borne invasions in 1274 and 1281. Fifty years before, the shogunate had agreed to Korean demands that the Wokou be dealt with to stop their raids, and this bit of good diplomacy had created a cooperative relationship between the two states, such that the Koreans, helpless with a Mongol occupation army garrisoning their country, had sent much intelligence information to Japan, so that along with messages from Japanese spies in the Korean peninsula, the shogunate had a good picture of the situation of the pending Mongol invasion. The shogunate had rejected Kublai's demands to submit with contempt. The Mongol landings of 1274 met with some success, however there was no rout of the Japanese defenders, who in any case greatly outnumbered the 40,000 combined invasion force of Mongols and Korean conscripts. Noting an impending storm, the Korean admirals advised the Mongols to re-embark so that the fleet could be protected away from shore; however, the typhoon was so destructive that one-third of the Mongol force was destroyed.
After the surviving forces returned to Mongol territory, Kublai was not dissuaded from his intentions on bringing Japan under Mongol control, and once again sent a message demanding submission, which infuriated the Hōjō leadership, who had the messengers executed. They responded with decisive action for defense—a wall was built to protect the hinterland of Hakata Bay, defensive posts were established, garrison lists were drawn up, regular manning of the home provinces was redirected to the western defenses, and ships were constructed to harass the invaders' fleet when they appeared.
The Mongols returned in 1281 with a force of some 50,000 Mongol-Korean-Chinese along with some 100,000 conscripts from the defeated Song empire in south China. This force embarked and fought the Japanese for some seven weeks at several locations in Kyushu, but the defenders held, and the Mongols made no strategic headway. Again, a typhoon approached, and the Koreans and Chinese re-embarked the combined Mongol invasion forces in an attempt to deal with the storm in the open sea. At least one-third of the Mongol force was destroyed, and perhaps half of the conscripted Song forces to the south over a two-day period of August 15–16. Thousands of invading troops were not able to embark in time and were slaughtered by the samurai. Such losses in men, material, and the exhaustion of the Korean state in provisioning the two invasions put an end to the Mongol's attempts to conquer Japan. The "divine wind," or kamikaze, was credited for saving Japan from foreign invasion.
For two further decades the Kamakura shogunate maintained a watch in case the Mongols attempted another invasion. However, the strain on the military and the financial expenditures weakened the regime considerably. Additionally, the defensive war left no gains to distribute to the warriors who had fought it, leading to discontent. Construction of defensive walls added further expenses to the strained regime.
In 1331, Emperor Go-Daigo took arms against Kamakura, but was defeated by Kamakura's Ashikaga Takauji and exiled to Oki Island, in today's Shimane Prefecture. A warlord then went to the exiled emperor's rescue, and in response the Hōjō sent forces again commanded by Takauji to attack Kyoto. Once there, however, Takauji decided to switch sides and support Go-Daigo. At the same time another warlord loyal to the emperor, Nitta Yoshisada, attacked Kamakura and took it. About 870 Hōjō clan, including the last three Regents, committed suicide at their family temple, Tōshō-ji, whose ruins were found in today's Ōmachi.
In 1336, Ashikaga Takauji assumed the position of shōgun himself, establishing the Ashikaga shogunate.
The Kamakura shogunate functioned within the framework of the Heian system of Imperial rule.
Yoritomo established a chancellery, or mandokoro, as his principal organ of government. Later, under the Hōjō, a separate institution, the hyōjōshū became the focus of government.
The shogunate appointed new military governors (shugo) over the provinces. These were selected mostly from powerful families in the different provinces, or the title was bestowed upon a general and his family after a successful campaign. Although they managed their own affairs, in theory they were still obliged to the central government through their allegiance to the shōgun. The military governors paralleled the existing system of governors and vice-governors (kokushi) appointed by the civil government in Kyoto.
Kamakura also appointed stewards, or jitō, to positions in the manors (shōen). These stewards received revenues from the manors in return for their military service. They served along with the holders of similar office, gesu, who delivered dues from the manor to the proprietor in Kyoto. Thus the dual governmental system reached to the manor level.