Nanjing means “southern capital” in Chinese. The city that is currently named Nanjing has had several names through history, and several other cities in China have also had that name. It is located on the southern bank of the Yangzi (Yangtze) River in a rich agricultural plain, close to the sea.
When China split three ways after the fall of the Han dynasty in 220 c.e., one of the states called Wu that controlled the Yangzi valley and the southern coast set up its capital at Nanjing; Wu was destroyed in 280.
Chaotic conditions in China led to successive invasions by nomads called the Xiongnu (Hsiung-nu) and Toba (T’o-pa), who destroyed the two capitals of the Han dynasty, Luoyang (Loyang) in 311 and Chang’an (Ch’ang-an) in 316.
For the next two and half centuries China was divided, the Xiongnu and other nomadic tribes ruling the north, while Chinese refugees from the north set up dynasties in the south. This era is known as the era of Division of the Northern and Southern Dynasties, during which Nanjing was capital of the southern dynasties.
As a result Nanjing gained the position as the bastion of Chinese rule, while nomadic barbarians ruled the north. In the 10th century, when China was again briefly divided, Nanjing was capital of one of the southern states.
When the Jurchen Jin (Chin) dynasty (a nomadic tribe from Manchuria) defeated the Song (Sung) dynasty and conquered northern China in 1127, the remnant Song court fled south and briefly established its capital in Nanjing. But it was vulnerable to Jin attacks and the Southern Song finally chose to establish its court in Hangzhou (Hangchou), located still farther south.
In mid-14th century, as the Mongol Yuan dynasty (1279–1368) was disintegrating, many rebel groups rose up in southern China. The most successful and farsighted rebel leader was Zhu Yuanzhang (Chu Yuanchang), who established his headquarters in Nanjing in 1356. By 1368 the Mongols had been driven back to Mongolia, and China was under the Ming dynasty (Ming means “brilliant”).
Zhu, now called Emperor Hongwu (Hung-wu), which means “Bountiful Warrior,” was concerned that Nanjing had never been the capital of unified China. He briefly considered making Kaifeng (K’aifeng) the Song capital, the capital city again, but he settled on Nanjing.
A great city wall 25 miles long was completed that incorporated sections of earlier walls, extended to the shores of the Yangzi River. It averaged 40 feet high and was 25 feet wide at the top, built on foundations of huge slabs of stones that could withstand gunpowder barrages.
The walls were faced with large fired bricks and filled with rubble. There were 13 gates with immense multiple portcullis gate enclosures, topped by gate towers. Construction of palaces and government buildings continued to the end of Emperor Hongwu’s reign in 1398.
Civil war erupted when Hongwu’s grandson and successor was challenged by his uncle the prince of Yan (Yen), whose army took Nanjing in 1402. The prince of Yan became Emperor Yongle (Yung-lo), and because his power base was in the north and Nanjing held bad memories for him, he had the ruined Yuan capital Dadu (T’a-tu) rebuilt; it became capital of the Ming dynasty, called Beijing (Peking). Nanjing remained the second capital, but no Ming emperor resided there again.