Beijing may be the capital of China today, but for many centuries the country was ruled from Nanjing, a historic city located on the shores of the Yangtze River. Now recognised as one of the Four Great Ancient Capitals of China, centuries of glory and prestige can still be found scattered among Nanjing’s modern skyscrapers – if you know where to look.

In China, the tortoise symbolises long life

My first stop was the southern foothills of Zhongshan, or Purple Mountain,16km east of the city centre. Here lay the mausoleum where the first Ming dynasty emperor, Zhu Yuanzhang, was buried along with his wife.

After defeating the Mongolians in 1368, Zhu named Nanjing the capital due to its large size and convenient trade location. Nanjing had already been the capital a number of times during China's tumultuous history of kingdoms and dynasties, but it was Zhu who solidified the city’s status for the first 53 years of the Ming dynasty.

As was customary in those times, Zhu commissioned the impressive mausoleum with its many pavilions and palaces to reflect the prosperity and stability of his empire. It took more than 30 years to build, during which time Zhu himself died and was buried on site in 1398.

I visited in September, and the humidity was high as I climbed up the hillside path surrounded by luscious vegetation and overhanging trees. On both sides of the track, stone warriors stood guard next to life-size elephants, lions and horses carved out of large rocks.

The mausoleum consisted of a number of interconnected pavilions, gates and monuments decorated with carved pillars and gargoyles. The beautiful rooftops were painted in radiant reds, blues and golds, and the ceilings were fantastically decorated. One of the most eye-catching monuments was a carved stone stele, carried on the back of an enormous stone tortoise in the recently restored Sifangcheng Pavilion near the mausoleum’s entrance. In China, the tortoise symbolises a long life.

The onsite museum displayed beautifully crafted wooden combs, hairpins, knives and porcelain pots that had been found at the site. And while Zhu’s actual tomb has not yet been excavated, Chinese scientists believe there is a labyrinth of treasure-filled corridors below ground just waiting to be uncovered.

Nanjing’s claustrophobic labyrinth could confuse any intruder

Zhu’s other major legacy was the construction of a wall around Nanjing, designed to protect the empire’s capital. The mortar used was made from lime, tong paste and glutinous rice paste – a recipe that has proven to be very successful; after six centuries most of the bricks are still in place.

Just south of the city centre is Zhonghua gate, the largest of the wall’s original 13 gates and a huge defensive complex made up of courtyards and ramparts. At the foot of the wall, there were 13 caves that could hide about 3,000 soldiers if the city was under attack. They would quietly wait in the dark until the enemy had entered the first part of the complex. The gate would then be lowered and the adversaries would be trapped in the courtyards, where Nanjing’s soldiers would take them on.

The caves felt claustrophobic, so I quickly exited back into the light and climbed onto the wall. The top afforded a fantastic view over the wide battlements onto traditional Chinese rooftops nestled alongside messy construction sites and ugly modern apartment buildings – a testament to Nanjing’s rapid modernisation.

Where China’s Republican flag flies proudly

The capital moved to Beijing in 1421, for the remainder of the Ming Dynasty and almost the entire Qing dynasty (1644-1911), but returned to Nanjing in 1912, when the last empire fell and Republican Nationalist Sun Yat-sen took over. Today, the Republican flag still waves proudly behind the gates of Nanjing’s old presidential palace. It’s a symbol that’s not shown openly anywhere else in the now Communist country.

When I visited, the government offices were still scattered with old typewriters and faded documents behind glass displays. I could imagine Sun Yat-sen wandering with his confidants in the elegant Chinese garden with its typical zigzag bridge and fishpond.

These were chaotic times after the Republic was founded. Beijing was shortly appointed the capital again, but Chiang Kai-shek, Sun’s successor, brought the title back to Nanjing in 1927. After all, this was where the glorious Ming dynasty had ruled for six centuries, laying the basis for modern China.

To emphasize the prestige of Nanjing, Chiang bequeathed a mausoleum to Sun, who died in 1925. It’s only a 10-minute walk from Zhu's, and one of the city’s most popular tourist attractions. Allegedly the Kuomintang, the revolutionary movement Sun and Chiang were part of, spent 1.5 million yuan on the site – and it showed.

A seemingly endless numbers of steps took me to the top of the hill, where the sarcophagus with the stone image of Sun Yat-sen was almost as impressive as the view. Inside, the pavilion’s bright blue ceiling was decorated with a golden star – the colours of the Kuomintang. It was much more modern than Zhu's mausoleum, which, over the centuries, seemed have become part of the mountain.

After walking my way through centuries of history, I felt as though I’d finally come full circle. This was where both the first and the last man to give Nanjing its capital status lay together in peace.

Correction: A previous version of this article incorrectly stated the date in which the capital moved to Beijing. This has been fixed.