During much of the interwar period, China had been suffering from a period of civil war and a series of continuous border conflicts that escalated into a full-blown war with Japan. Much of China would be occupied by Japan through the end of WW2, but both the Nationalist Kuomintang (KMT) government and Chinese Communist Party (CPC) would stave off total defeat and put up resistance to the end of the war.
Unfortunately for China, they weren't in a particularly good position to fight a modern war. China by the 1930s was suffering from a civil war and a weak national government that allowed for local warlords to maintain a fairly high degree of autonomy. Manchuria, for example, was nominally a Chinese territory, but when the Japanese assassinated the warlord (1928) and later invaded and installed a puppet government (1931), it wasn't treated as open war with China. While this was hardly taken lightly by China or the rest of the world, the KMT government was focusing its efforts closer to home to consolidate power and crush the CPC after years of cooperation. During this period, the KMT was building up a core of well-trained modern forces trained by German advisors.
The same belligerence of Japan's Kwantung Army in Manchuria that led to their invasion in 1931 would continue in the coming years, with continuous border incidents gradually escalating until 1937, when an incident at the Marco Polo Bridge near Peking served as a casus belli for Japan to escalate into a full-blown war. The first significant engagement of the war, at Shanghai, ground down into months of city fighting in which the KMT committed the bulk of its German-trained and equipped soldiers. Unfortunately for the KMT, they lacked the numbers and quality of heavy weapons, aircraft, and warships that the Japanese could bring to bear, and, after the annihilation of much of the army, were forced back out of the city. From there, Japan made its way up the river to the KMT capital of Nanking, believing its capture would bring China to surrender. Again, brutal fighting ensued, with the Japanese taking the city and descending into a now infamous frenzy of rape and pillage.
Despite these setbacks, the KMT government refused to surrender. As 1938 opened, they fell back up the Yangtze to Wuhan. As Japanese forces pushed deeper into China, the decision was made to open the dikes on the Yellow River in June, causing a massive flood to spread over the region in hopes of cutting off the Japanese line of advance towards Wuhan. Unfortunately for the KMT, the floods failed to hold back the Japanese - approaching from a different direction, Wuhan was assaulted in October and would later fall, again after bitter fighting.
After the fall of Wuhan, the war in China ground to a halt. Japan had successes seizing critical ports along the Chinese coast, but the KMT government had relocated to the remote city of Chongqing, which would serve as its capital for the remainder of the war. As Japan and Germany grew closer, China was forced to find a new patron, which they found in the form of the USSR. The Soviets would provide a fair amount of military aid - especially in the form of aircraft - but like the German support, the aid that made it to the KMT was never enough to shift the tide of the war. A major counteroffensive was launched in 1939 by the KMT, but it ground down, and fighting between Japanese and Chinese forces in China would grind into insurgencies punctuated by the occasional (failed) Chinese offensive. Once the greater war in the Pacific opened up, the Allies did look to China as a jumping-off point for various plans - particularly bombing raids - but they consistently ran into issues with the remoteness of the remaining KMT territories. The mountains along China's southern border formed a major barrier to any incoming supplies, and fighting in Burma further complicated attempts to get supplies to Chongqing. The US did attempt to stage B-29s out of KMT territory for raids on Japan, but found that the rough conditions and precarious supply situation made operations with the sophisticated bombers impractical.
That's not to say that the Chinese were just sitting on their hands while the Allies liberated the Pacific. The quagmire in China tied down massive amounts of men and materiel that Japan desperately needed elsewhere. There were close to a million soldiers in Manchuria alone when the Soviets invaded in 1945, and around 1.3 million soldiers and 500,000 civilians were in the rest of China when Japan surrendered. The KMT and CPC resistance kept a steady drain on rapidly dwindling Japanese resources and was responsible for something like 40% of the casualties they suffered through the war.