NEW YORK—It’s 10 minutes after closing time and kitchen workers are busy cleaning up an empty Tribeca restaurant. What remains of the day’s menu has been dropped into tin trays that are stacked and waiting for pickup. Just a few years ago, the food that didn’t make it into a $10 lunch bowl would have been thrown away, trucked out of town and left to rot in a landfill. But these leftovers are headed to a different location. A volunteer grabs the trays, and the Brussel sprouts, leafy greens and farro begin a mile-long trip down Canal Street before they arrive at a shelter.

Lunch for downtown workers has become dinner for the homeless.

How the leftover bounty from Dig Inn didn’t end up buried with the rest of New York’s garbage is the story of a tiny nonprofit that has applied a millennial generation eco-mindedness to a persistent and shocking problem: that a nation so rich in resources still has trouble feeding all its citizens.

In 2013, Robert Lee, then a 23-year-old one-time aspiring master of the finance world, created Rescuing Leftover Cuisine, which intercepts food before it hits the dumpsters and delivers it by hand to nearby shelters, soup kitchens and social service agencies. Last year, Rescuing Leftover Cuisine collected more than 792,000 pounds of food, which sounds like a lot until you learn that the United States each year tosses up to 160 billion pounds of food. Most of that waste is committed by people at home (the average family of four throws out 1,160 pounds of food a year) but as much as 33 billion pounds ends up in the trash behind restaurants, grocery stores and other food retailers. Nationally, just 2 percent of restaurants say they donate their unused food.