"We all want a new India. I want to bow down my head and say thank you," he said in a victory address to supporters of his Bharatiya Janata Party (BJP).
The BJP is projected to get about 300 of the 543 seats in parliament.
It is likely to take a larger share of the vote than in the 2014 elections.
The main opposition alliance, which is headed by Rahul Gandhi's Congress party, has admitted defeat.
The general election was widely viewed as a referendum on the prime minister's Hindu nationalist politics, and the victory was won despite growing unemployment, fears of a recession and a slump in industrial production.
Partial and declared results show Mr Modi's BJP is projected to win 300 seats on its own, and combined with the party's allies, this number reaches nearly 350.
The main opposition Congress party is expected to win fewer than 60.
A party or coalition needs at least 272 seats to secure a majority in the 543-member lower house of parliament, or Lok Sabha.
In 2014, the BJP won 282 seats - the biggest victory by any party in 30 years - and with its allies it secured 336 seats in that parliament.
The Congress, which won just 44, suffered its worst defeat in 2014 and with its allies took up just 60 seats in the lower house.
More than 600 million people voted in a marathon six-week process, which involved seven rounds of voting.
The 68-year-old prime minister was showered with rose petals by thousands of supporters as he arrived at the BJP headquarters on Thursday evening.
"This election was fought not by politicians but the people of this country - but it's the people of this country who have emerged victorious," Mr Modi told supporters in Delhi.
"We will never give up our ideals, our humility and our culture," he added.
He said the victory was for the whole of the country, and vowed to build a "strong and inclusive India".
Party members cheered, banged drums and set off fireworks when the results started to emerge.