structural:expansion, linguistic:voice_change, information:highlighting
Capital of the Southern Ming

Over two centuries after the removal of the capital to Beijing, Nanjing was destined to become the capital of a Ming emperor one more time. After the fall of Beijing to Li Zicheng 's rebel forces and then to the Manchu -led Qing dynasty in the spring of 1644, the Ming prince Zhu Yousong was enthroned in Nanjing in June 1644 as the Hongguang Emperor. His short reign was described by later historians as the first reign of the so-called Southern Ming dynasty.

Zhu Yousong, however, fared a lot worse than his ancestor Zhu Yuanzhang three centuries earlier. Beset by factional conflicts, his regime could not offer effective resistance to Qing forces, when the Qing army, led by the Manchu prince Dodo approached Jiangnan the next spring. Days after Yangzhou fell to the Manchus in late May 1645, the Hongguang Emperor fled Nanjing, and the imperial Ming Palace was looted by local residents. On June 6, Dodo's troops approached Nanjing, and the commander of the city's garrison, Zhao the Earl of Xincheng, promptly surrendered the city to them. The Manchus soon ordered all male residents of the city to shave their heads in the Manchu queue way. They requisitioned a large section of the city for the bannermen 's cantonment, and occupied the former imperial Ming Palace, but otherwise the city was spared the mass murders and destruction that befell Yangzhou.

Despite capturing many counties in his initial attack due to surprise and having the initiative, Koxinga announced the final battle in Nanjing in 1659 ahead of time giving plenty of time for the Qing to prepare because he wanted a decisive, single grand showdown as his father successfully did against the Dutch at the Battle of Liaoluo Bay, throwing away the surprise and initiative which led to its failure. Koxinga's attack on Qing held Nanjing which would interrupt the supply route of the Grand Canal leading to possible starvation in Beijing caused such fear that the Manchus (Tartares) considered returning to Manchuria (Tartary) and abandoning China according to a 1671 account by a French missionary. The commoners and officials in Beijing and Nanjing were waiting to support whichever side won. An official from Qing Beijing sent letters to family and another official in Nanjing, telling them all communication and news from Nanjing to Beijing had been cut off, that the Qing were considering abandoning Beijing and moving their capital far away to a remote location for safety since Koxinga's iron troops were rumored to be invincible. Koxinga's forces intercepted these letters and after reading them Koxinga may have started to regret his deliberate delays allowing the Qing to prepare for a final massive battle instead of swiftly attacking Nanjing. Koxinga's Ming loyalists fought against a majority Han Chinese Bannermen Qing army when attacking Nanjing. The siege lasted almost three weeks. Koxinga's forces were unable to maintain a complete encirclement, which enabled the city to obtain supplies and even reinforcements—though cavalry attacks by the city's forces were successful even before reinforcements arrived. Koxinga's forces were defeated and "slipped back" to the ships which had brought them.