Modi visited the wall, which at its base is 50 or 60 feet wide and at the top is about 40 feet wide, after holding wide-ranging talks with President Xi Jinping and visiting the Giant Wild Goose Pagoda.
The wall, which is a 40-foot tall rectangle and stretches for about 14 kilometres, was erected in the 14th century Ming Dynasty, under the regime of Emperor Zhu Yuanzhang.
Parts of the wall date back to 7th century and the wall as it is known today was completed in the 14th century.
Since then, it has been refurbished three times -- roughly once every 200 years -- in the late 1500s, the late 1700s and, most recently, in 1983.
More From This Section
Prime Minister Modi was given a Tang dynasty welcome at the Ancient City Gate in Xian.
At the City Wall complex, Xi also hosted a banquet in Prime Minister Modi's honour.
After the dinner, Modi and Xi watched a colourful cultural event.
Modi will hold bilateral talks with Premier Li Keqiang tomorrow in Beijing.