The period between 1750 and 1914 was pivotal in world history, and particularly in East Asia. China had long been the only superpower in the region, secure in the knowledge that it was the Middle Kingdom around which the rest of the world pivoted. Japan, cushioned by stormy seas, held itself apart from its Asian neighbors much of the time, and had developed a unique and inward-looking culture.
Beginning in the 18th century, however, both Qing China and Tokugawa Japan faced a new threat: imperial expansion by the European powers and later the United States. Both countries responded with growing nationalism, but their versions of nationalism had different focuses and outcomes.
Japan's nationalism was aggressive and expansionist, allowing Japan itself to become one of the imperial powers in an astonishingly short amount of time. China's nationalism, in contrast, was reactive and disorganized, leaving the country in chaos and at the mercy of foreign powers until 1949.
In the 1700s, foreign traders from Portugal, Great Britain, France, the Netherlands, and other countries sought to trade with China, which was the source of fabulous luxury products like silk, porcelain, and tea. China allowed them only in the port of Canton, and severely restricted their movements there. The foreign powers wanted access to China's other ports and to its interior.
The First and Second Opium Wars (1839-42 and 1856-60) between China and Britain ended in humiliating defeat for China, which had to agree to give foreign traders, diplomats, soldiers, and missionaries access rights. As a result, China fell under economic imperialism, with different western powers carving out "spheres of influence" in Chinese territory along the coast.
It was a shocking reversal for the Middle Kingdom. The people of China blamed their rulers, the Qing emperors, for this humiliation, and called for the expulsion of all foreigners - including the Qing, who were not Chinese but ethnic Manchus from Manchuria. This groundswell of nationalist and anti-foreigner feeling led to the Taiping Rebellion (1850-64). The charismatic leader of the Taiping Rebellion, Hong Xiuquan, called for the ouster of the Qing Dynasty, which had proved itself incapable of defending China and getting rid of the opium trade. Although the Taiping Rebellion did not succeed, it did severely weaken the Qing government.
Nationalist feeling continued to grow in China after the Taiping Rebellion was put down. Foreign Christian missionaries fanned out in the countryside, converting some Chinese to Catholicism or Protestantism, and threatening traditional Buddhist and Confucian beliefs. The Qing government raised taxes on ordinary people to fund half-hearted military modernization, and pay war indemnities to the western powers after the Opium Wars.
In 1894-95, the people of China suffered another shocking blow to their sense of national pride. Japan, which had at times been a tributary state of China's in the past, defeated the Middle Kingdom in the First Sino-Japanese War, and took control of Korea. Now China was being humiliated not only by the Europeans and Americans, but also by one of their nearest neighbors, traditionally a subordinate power. Japan also imposed war indemnities, and occupied the Qing emperors' homeland of Manchuria.
As a result, the people of China rose up in anti-foreigner fury once more in 1899-1900. The Boxer Rebellion began as equally anti-European and anti-Qing, but soon the people and the Chinese government joined forces to oppose the imperial powers. An eight-nation coalition of the British, French, Germans, Austrians, Russians, Americans, Italians, and Japanese defeated both the Boxer Rebels and the Qing Army, driving Empress Dowager Cixi and Emperor Guangxu out of Beijing. Although they clung to power for another decade, this was really the end for the Qing Dynasty.
The Qing Dynasty fell in 1911, the Last Emperor Puyi abdicated the throne, and a Nationalist government under Sun Yat-sen took over. However, that government did not last long, and China slipped in to a decades-long civil war between the nationalists and the communists that only ended in 1949, when Mao Zedong and the Communist Party prevailed.
For 250 years, Japan existed in quiet and peace under the Tokugawa Shoguns (1603-1853). The famed samurai warriors were reduced to working as bureaucrats and writing wistful poetry, because there were no wars to fight. The only foreigners allowed in Japan were a handful of Chinese and Dutch traders, who were confined to an island in Nagasaki Bay.
In 1853, however, this peace was shattered when a squadron of American steam-powered warships under Commodore Matthew Perry showed up in Edo Bay (now Tokyo Bay) and demanded the right to refuel in Japan.
Just like China, Japan had to allow foreigners in, sign unequal treaties with them, and allow them extraterritorial rights on Japanese soil. Also like China, this development sparked anti-foreign and nationalist feelings in the Japanese people, and caused the government to fall. However, unlike China, the leaders of Japan took this opportunity to thoroughly reform their country. They quickly turned it from an imperial victim to an aggressive imperial power in its own right.
With China's recent Opium War humiliation as a warning, the Japanese started with a complete overhaul of their government and social system. Paradoxically, this modernization drive centered around the Meiji Emperor, from an imperial family that had ruled the country for 2,500 years. For centuries, however, the emperors had been figureheads, while the shoguns wielded actual power.
In 1868, the Tokugawa Shogunate was abolished and the emperor took the reins of government in the Meiji Restoration. Japan's new constitution also did away with the feudal social classes, made all of the samurai and daimyo into commoners, established a modern conscript military, required basic elementary education for all boys and girls, and encouraged the development of heavy industry. The new government convinced the people of Japan to accept these sudden and radical changes by appealing to their sense of nationalism; Japan refused to bow to the Europeans, they would prove that Japan was a great, modern power, and Japan would rise to be the "Big Brother" of all of the colonized and down-trodden peoples of Asia.
In the space of a single generation, Japan became a major industrial power with a well-disciplined modern army and navy. This new Japan shocked the world in 1895 when it defeated China in the First Sino-Japanese War. That was nothing, however, compared to the complete panic that erupted in Europe when Japan beat Russia (a European power!) in the Russo-Japanese War of 1904-05. Naturally, these amazing David-and-Goliath victories fueled further nationalism, leading some of the people of Japan to believe that they were inherently superior to other nations.
While nationalism helped to fuel Japan's incredibly quick development into a major industrialized nation and an imperial power, and helped it fend off the western powers, it certainly had a dark side as well. For some Japanese intellectuals and military leaders, nationalism developed into fascism, similar to what was happening in the newly-unified European powers of Germany and Italy. This hateful and genocidal ultra-nationalism led Japan down the road to military overreach, war crimes, and eventual defeat in World War II.