In a letter to Koirala, Modi has said: "I also take this opportunity to offer my best wishes and prayers for your well-being and a full and speedy recovery to good health."
Koirala was diagnosed with first stage lung cancer and is going to take the first round of radiotherapy beginning Wednesday. Modi's message was made public by Koirala's private secretariat Monday.
Modi also took the opportunity to underscore the unique relations between Nepal and India.
"Relations between India and Nepal are truly unmatched in character, depth and diversity," Modi said in his letter.
"We are nurtured by the same mountains and rivers and bound by ancient ties of religion, culture and kinship. Our engagement today covers the full spectrum of human endeavours and takes place seamlessly across our open borders."
Modi appreciated Koirala's presence at his (Modi's) swearing-in ceremony last month.
"I am writing to convey my deep appreciation for your participation in my swearing-in ceremony last month and for the good wishes that you brought from the friendly people of Nepal.
"Your presence, along with other leaders from the region, was a celebration of democracy's process in our region."
The Indian prime minister expressed his support for a democratic Nepal.
"It is, therefore, in recognition of our inter-linked destinies that India has watched with admiration and supported, whenever asked, Nepal's extraordinary process of political change and democratic process.
"Nepal's economic development too is in the fundamental interest of our two countries. I assure you that India will continue to provide all support to the government and people of Nepal in their quest to build a stable, prosperous, inclusive and democratic nation."