Contact with Chandrayaan-2 was lost moments before its Vikram module was due to touch down at the lunar south pole.
The fate of the craft is not yet known, but Mr Modi said there would be further opportunities.
India would have been the fourth nation to make a soft landing on the Moon.
“The best is yet to come in our space programme. India is with you,” said Mr Modi.
The Chandrayaan-2 approached the Moon as normal until an error occurred about 2.1km (1.3 miles) from the surface, officials said.
India’s Space Research Organization (Isro) said it lost contact seconds before the ship was expected to land.
The country’s first Moon mission – Chandrayaan-1, in 2008 – carried out the first and most detailed search for water on the lunar surface using radars.
Chandrayaan-2 entered the Moon’s orbit on 20 August and was due to make a controlled descent to the surface early on Saturday, Indian time, over a month after it first took off.
Staff at mission control were glued to the screens at Isro’s Bangalore space centre as the spacecraft made its descent towards the surface.
The control room burst into applause during the so-called rough breaking phase of the descent, with Prime Minister Modi watching the action from behind a glass screen.
Isro chairman Kailasavadivoo Sivan announced to staff that the ship’s initial descent had been “normal,” and that the mission’s data would be analysed.
Mr Sivan had earlier described the final descent as “15 minutes of terror”.
What was this mission all about?
Chandrayaan-2 (Moon vehicle 2) was the most complex mission ever attempted by India’s space agency, Isro. “It is the beginning of a historical journey,” Isro chief K Sivan said after launch in July.
The lander (named Vikram, after the founder of Isro) carried within its belly a 27kg Moon rover with instruments to analyse the lunar soil.
The rover (called Pragyan – wisdom in Sanskrit) had the capacity to travel 500m from the lander in its 14-day life span, and would have sent data and images back to Earth for analysis.
The mission would have focused on the lunar surface, searching for water and minerals and measuring moonquakes, among other things.
Why would it have been significant?
A soft landing on another planetary body – a feat achieved by just three other countries so far – would have been a huge technological achievement for Isro and India’s space ambitions, writes science writer Pallava Bagla.
He adds that it would also have paved the way for future Indian missions to land on Mars, and opened up the possibility of India sending astronauts into space.
For the first time in India’s space history, the interplanetary expedition was led by two women – project director Muthaya Vanitha and mission director Ritu Karidhal.
It is also a matter of national pride – the satellite’s lift-off in July was broadcast live on TV and Isro’s official social media accounts.
The mission has also made global headlines because it’s so cheap – the budget for Avengers: Endgame, for instance, was more than double at an estimated $356m. But this isn’t the first time Isro has been hailed for its thrift. Its 2014 Mars mission cost $74m, a tenth of the budget for the American Maven orbiter.