The Kamakura period ended in 1333 with the destruction of the shogunate and the short reestablishment of imperial rule under Emperor Go-Daigo by Ashikaga Takauji, Nitta Yoshisada, and Kusunoki Masashige.
Once Minamoto Yoritomo had consolidated his power, he established a new government at his family home in Kamakura. He called his government a bakufu (幕府, tent government), but because he was given the title Seii Tai-shōgun by the Emperor, the government is often referred to in Western literature as the shogunate. Yoritomo followed the Fujiwara form of house government and had an administrative board , a board of retainers (問注所), and a board of inquiry Samurai-dokoro . After confiscating estates in central and western Japan, he appointed stewards for the estates and constables for the provinces. As shogun, Yoritomo was both the steward and the constable general. The Kamakura shogunate was not a national regime, however, and although it controlled large tracts of land, there was strong resistance to the stewards. The regime continued warfare against the Northern Fujiwara, but never brought either the north or the west under complete military control. The old court resided in Kyoto, continuing to hold the land over which it had jurisdiction, while newly organized military families were attracted to Kamakura.
Despite a strong beginning, Yoritomo failed to consolidate the leadership of his family on a lasting basis. Intrafamily contention had long existed within the Minamoto, although Yoritomo had eliminated most serious challengers to his authority. When he died suddenly in 1199, his son Minamoto no Yoriie became shogun and nominal head of the Minamoto, but Yoriie was unable to control the other eastern warrior families. By the early thirteenth century, a regency had been established for the shogun by Hōjō Tokimasa—a member of the Hōjō clan, a branch of the Taira that had allied itself with the Minamoto in 1180. The head of Hōjō was installed as the regent for the shogun is called the Shikken in the period, although later positions were created with similar power such as Tokuso and Rensho. Often the Shikken was also the Tokuso and Rensho. Under the Hōjō, the shogun became a powerless figurehead.
With the protector of the Emperor (shogun) a figurehead himself, strains emerged between Kyoto and Kamakura, and in 1221 the Jōkyū War broke out between the Cloistered Emperor Go-Toba and the second regent Hōjō Yoshitoki. The Hōjō forces easily won the war, and the imperial court was brought under the direct control of the shogunate. The shogun's constables gained greater civil powers, and the court was obliged to seek Kamakura's approval for all of its actions. Although deprived of political power, the court retained extensive estates.
Several significant administrative achievements were made during the Hōjō regency. In 1225 the third regent Hōjō Yasutoki established the Council of State, providing opportunities for other military lords to exercise judicial and legislative authority at Kamakura. The Hōjō regent presided over the council, which was a successful form of collective leadership. The adoption of Japan's first military code of law—the Goseibai Shikimoku—in 1232 reflected the profound transition from court to militarized society. While legal practices in Kyoto were still based on 500-year-old Confucian principles, the new code was a highly legalistic document that stressed the duties of stewards and constables, provided means for settling land disputes, and established rules governing inheritances. It was clear and concise, stipulated punishments for violators of its conditions, and remained in effect for the next 635 years.
As might be expected, the literature of the time reflected the unsettled nature of the period. The Hōjōki describes the turmoil of the period in terms of the Buddhist concepts of impermanence and the vanity of human projects. The Heike monogatari narrated the rise and fall of the Taira, replete with tales of wars and samurai deeds. A second literary mainstream was the continuation of anthologies of poetry in the Shin Kokin Wakashū, of which twenty volumes were produced between 1201 and 1205.
The older Buddhist sects such as Shingon, Tendai and the early schools of the Nara period continued to thrive through the Kamakura period, and even experienced some measure of a revival. However, with the increasing popularity of the new Kamakura schools, the older schools partially eclipsed as the newer "Kamakura" schools found followers among the new Kamakura government, and its samurai.
The repulsions of two Mongol invasions were momentous events in Japanese history. Japanese relations with China had been terminated in the mid-ninth century after the deterioration of late Tang Dynasty China and the turning inward of the Heian court. Some commercial contacts were maintained with the Southern Song Dynasty of China in later centuries, but Japanese pirates made the open seas dangerous. At a time when the shogunate had little interest in foreign affairs and ignored communications from China and Goryeo (as Korea was then known), news arrived in 1268 of a new Mongol regime in Beijing. Its leader, Kublai Khan, demanded that the Japanese pay tribute to the new Yuan Dynasty and threatened reprisals if they failed to do so. Unused to such threats, Kyoto raised the diplomatic counter of Japan's divine origin, rejected the Mongol demands, dismissed the Korean messengers, and started defensive preparations.
After further unsuccessful entreaties, the first Mongol invasion took place in 1274. More than 600 ships carried a combined Mongol, Chinese, and Korean force of 23,000 troops armed with catapults, combustible missiles, and bows and arrows. In fighting, these soldiers grouped in close cavalry formations against samurai, who were accustomed to one-on-one combat. Local Japanese forces at Hakata, on northern Kyūshū, defended against the superior mainland force, which, after one day of fighting was decimated by the onslaught of a sudden typhoon. Kublai realized that nature, not military incompetence, had been the cause of his forces' failure so, in 1281, he launched a second invasion. Seven weeks of fighting took place in northwestern Kyūshū before another typhoon struck, again destroying the Mongol fleet.
Although Shinto priests attributed the two defeats of the Mongols to a "divine wind" or kamikaze, a sign of heaven's special protection of Japan, the invasion left a deep impression on the shogunate leaders. Long-standing fears of the Chinese threat to Japan were reinforced. The Japanese victory, however, gave the warriors a sense of fighting superiority that remained with Japan's soldiers until 1945. The victory also convinced the warriors of the value of the shogunate form of government.
The Mongol war had been a drain on the economy, and new taxes had to be levied to maintain defensive preparations for the future. The invasions also caused disaffection among those who expected recompense for their help in defeating the Mongols. There were no lands or other rewards to be given, however, and such disaffection, combined with overextension and the increasing defense costs, led to a decline of the Kamakura bakufu. Additionally, inheritances had divided family properties, and landowners increasingly had to turn to moneylenders for support. Roving bands of ronin further threatened the stability of the shogunate.
In the swell of victory, Go-Daigo endeavored to restore imperial authority and tenth-century Confucian practices. This period of reform, known as the Kemmu restoration, aimed at strengthening the position of the Emperor and reasserting the primacy of the court nobles over the warriors. The reality, however, was that the forces who had arisen against Kamakura had been set on defeating the Hōjō, not on supporting the Emperor. Ashikaga Takauji finally sided with the Northern Court in a civil war against the Southern Court represented by Go-Daigo. The long War Between the Courts lasted from 1336 to 1392. Early in the conflict, Go-Daigo was driven from Kyoto, and the Northern Court contender was installed by Ashikaga, who established a new line of shoguns.