NEW DELHI—India attempted a one-day nationwide shutdown on Sunday, hoping to slow the spread of the coronavirus and give citizens and policy makers a taste of how the massive, boisterous democracy would behave under unprecedented restrictions.

During the 7 a.m. to 9 p.m. lockdown—dubbed the “people’s curfew” by Prime Minister Narendra Modi when he unveiled it—people were asked to stay in their homes and most businesses were shut.

...