Where does the modern Chinese superpower come from? Only 75 years ago, China was divided, impoverished, economically exploited and at war with ambitiously imperialist Japan. The notional rulers of China, Chiang Kai-shek and his nationalist Kuomintang party, controlled a shrinking area of central and south-west China, fighting the Japanese with a poorly armed and trained army, and sometimes fighting the Chinese communists ensconced in China's north-west. In 1940, the Chinese nationalists seemed close to defeat and Japan's vision of a "Great East Asia Co‑Prosperity Sphere" (a Japanese-dominated Asian new order) looked closer than ever to achievement. Somehow, the rump independent China survived and, against considerable odds, became one of the victorious allies in 1945. But how?

The answer to this question has never much bothered western historians, who, for better or worse, have focused on what they see as the real war in Europe and the Pacific, where easily identifiable victories can be found and the explanation is clear. It is that neglect which has prompted Rana Mitter, professor of Chinese history at Oxford, to write the first full account of China's wartime resistance against Japan, restoring a vital part of the wartime narrative to its rightful place. Now, for the first time, it is possible to assess the impact of the war on Chinese society and the many factors that explain the Japanese failure in China and the eventual triumph of Mao Zedong's communists in 1949, from which the superpower has grown. It is a remarkable story, told with humanity and intelligence; all historians of the second world war will be in Mitter's debt.

The sheer scale and complexity of the Sino-Japanese war is daunting enough and Mitter, perhaps wisely, does not get bogged down in the technical and tactical details of how the war was fought. There were armies numbering millions on both sides, a fact that explains why the Japanese expansion in the Pacific theatre ran out of steam in 1942. The Chinese war effort could not hope to match that of the more developed states, but it dominated the administrative and economic spheres in China, while condemning tens of millions of Chinese to high levels of deprivation and hunger throughout the conflict. Mitter does not add to the debate about deaths, occasioned by the obvious absence of reliable statistics, but suggests the current estimates of between 15 and 20 million dead may not be wide of the mark; at the least, more than 90 million Chinese became refugees in their own country.

Moreover, the war encouraged the political fragmentation of Chinese territory as Japanese encroachments grew. In the north and east, the Japanese conquered large areas, where they installed and collaborated with puppet regimes, including Puyi (the last emperor) in Manchuria. Mongolia was more or less under Soviet domination. In the south and east, rival warlords maintained an uneasy relationship with Chiang's nationalists. In Nanjing, Chiang's former colleague Wang Jingwei set up a rival nationalist government under Japanese supervision in 1940. In the north-west, Mao Zedong and Zhou Enlai created a communist-dominated territory in Yan'an. Making sense of the different polities is a challenge in its own right, but the many divisions also explain not only the difficulty Chiang had in ever establishing an integrated, sovereign Chinese state, but the problems faced by the Japanese as they confronted the vast land area and the mosaic of local rulers.

Mitter explores this complex politics with remarkable clarity and economy. At the heart of the story is Chiang Kai‑shek, the one leader the West or Stalin ever took seriously. The war he fought was long and bloody, starting in 1931 with the Japanese occupation of Manchuria, and escalating into full-scale conflict in July 1937, when both sides on the pretext of an incident at an ornate bridge at Lugouqiao (the so-called Marco Polo Bridge) near Beijing embarked on open war. The Japanese disregard for the Chinese as racial inferiors is well-known. Less familiar is Chiang's dismissal of the Japanese as "dwarf bandits" and his misplaced confidence that his large but ill‑equipped armies could match Japanese military skills. Chiang never seems seriously to have considered an armistice, but instead called for a "war of resistance to the end" (Kangzhan daodi), which condemned many Chinese to years of harsh Japanese control, near famine conditions, and an increasingly brutal and terroristic Kuomintang regime.

The early years of war are in many ways the most arresting historically, partly because Chiang and Mao were largely on their own. Neither the Soviet Union nor the western powers wanted to be involved in war in China, and none of them was much interested in supplying money or goods. It is worth reflecting that for all the contemporary and subsequent criticism levelled at Chiang's war effort, the Chinese did not collapse entirely, unlike the European forces in Burma, Malaya and the East Indies, or the Americans in the Philippines. Mitter describes horrors on both sides. The Japanese "rape of Nanjing" – the one event of the war that is familiar worldwide – did happen, and Mitter will have no truck with Japanese attempts to explain it away. But he also explores the background that led Chiang ruthlessly to order the destruction of the dykes on the Yellow River to stop the Japanese advance, which left more than half a million Chinese dead and 4.8 million as refugees.

This story in itself says much about what was different in the Chinese war from war elsewhere. Reading Mitter, it is clear that for western readers understanding how Chinese society coped with total war requires a profound adjustment. Chinese fought Chinese, as well as Japanese. While the war with Japan was fought with terrible levels of atrocity, Chiang's security chief Dai Li (the "Chinese Himmler", apparently) ran a terror organisation that killed and tortured thousands of Chinese suspected of treason or of being communist. Wang Jingwei also had his security thugs, including Li Shiqun, a Shanghai gangster, whose Gestapo-like headquarters at "Number 76" in Shanghai proved too much even for the Japanese supervisors. Li was invited to dine at a hotel with Japanese secret policemen and died a day later from poison in his fish course. Chiang's resistance to the Japanese during the Pacific war (1941-45) forced the west to turn a blind eye to the campaign of terror that went with it.

One of the threads running through Mitter's account is Chiang's difficult relationship with the west, which treated him with a patronising disdain born of years of pseudo-imperialism. Mitter quotes a complaint from a British diplomat at Chiang's wartime capital at Chongqing about the "pitch of arrogance" in Chinese attitudes following humiliating defeat for British Empire troops in 1942 – a clear case of the pot calling the kettle black. Chiang in the end had something to record. China did not surrender, nor were Chinese forces completely defeated. In 1945, the allies hardly bothered to acknowledge what China had done, but for eight years Japan had been bogged down in Asia, unable to focus on the expensive war against the west and exposed for all to see as an atrocious and self-interested imperial power.

The fact of Chinese victory, Mitter argues, opened the way for the Chinese people to begin the search for a new identity that went beyond the fractured allegiances of the wartime experience. Mao defeated Chiang four years later and the long story of the rise of modern China could begin. No one could ask for a better guide than Mitter to how that story began in the cauldron of the Chinese war.