With relations between Chiang and the Soviet Union dramatically improved due to the attack on China by Japanese forces in the Second Sino-Japanese War, Cherepanov returned to China as chief military adviser to Chiang's government in Nanking from August 1938 to September 1939 and helped organize the 1938 defense of Wuhan – although the city fell to the combined might of the Japanese troops, planes, and ships.