Modi said in an address to the nation that the curfew on Sunday from 7:00am to 9:00pm would test the giant country's ability to take tough measures against what he called a growing "crisis".
The measure would be "in the interest of the country to follow and prepare us for future challenges."
The government says there have been 173 infections and four deaths from the virus. But the public is increasingly anxious and there has been a rush on food stores and essential supplies. Modi said most people, except those in essential services, would have to stay home for several weeks, without giving a timeframe.
"If you feel you won't be affected or infected, you are wrong," Modi said.
Copyright Agence France-Presse, 2020