Modi, who flew in here from Moscow in the wee hours, was received by Afghan National Security Adviser Mohammad Hanif Atmar and Deputy Foreign minister Hekmat Karzai.
"From Russia to Afghanistan. A pre-dawn arrival in Kabul begins a day of engagements with another 'dost' (friend)," tweeted External Affairs Ministry spokesman Vikas Swarup.
Modi was then accorded a ceremonial welcome after which he met Ghani who received him warmly at the Presidential palace.
"The embrace of a friend, the strength of a true partner. Prez @ashrafghani welcomes PM @narendramodi in Kabul," Swarup tweeted.
More From This Section
The two leaders discussed a wide range of issues, including the ongoing cooperation between the two countries and the Indian aid programme.
The two leaders also took stock of the security situation in Afghanistan where the signs of resurgence of Taliban are being witnessed.
After the meeting, Modi inaugurated the new Afghan Parliament building which has been constructed by India and addressed the lawmakers of this country.
Modi said India's scheme of 1,000 scholarships every year for Afghan students will continue.
"We are pleased with the response to our special scholarship scheme in agriculture science," he added.
"Power and water will flow out of Salma Dam soon. The Stor Palace will again stand as a symbol of your priceless heritage," he said.
The Prime Minister also expressed gratitude to the Indian diplomats, officers, engineers and doctors, "who serve here with pride, to the families of our Indian martyrs".