Bill Niman in front of his cattle at Bolinas Ranch. (Roman Cho)

A few hundred feet from Bill Niman’s modest ranch house is a barn he built to house pigs. It was the late 1970s. Niman already had been raising hogs for a few years outdoors when he got his hands on National Hog Farmer magazine. “I thought, man, this stuff is cool,” he said. “You put pigs in buildings. They don’t have to be outside in the weather. It’s easy to maintain. You push a few buttons and can run the whole . . . thing from your kitchen table.” He went to Iowa, toured a few farms and came back and built the barn. “Then I realized what madness it was. We never put a pig in there.”

The barn is now a storage facility for a local artist and a winemaker, and Niman is now synonymous with humanely raised meat. Over the years, his customers have included restaurants from Chez Panisse to Chipotle. Though it has been a decade since he had any involvement with Niman Ranch — the company that bears his name is now owned by chicken giant Perdue — Niman, 72 with two young sons, is preparing for his next, and perhaps his last, act.

Niman has sold BN Ranch, his boutique cattle and heritage turkey operation, to the meal-kit pioneer Blue Apron. As part of the February deal, he will join the company to build a pasture-centric supply chain for all the beef, pork, turkey and chicken that Blue Apron ships in its 8 million meals each month.

The deal provides financial security for his family, Niman says. But it’s also a chance to complete his life’s mission: restoring a more sensible way of raising animals. “I haven’t finished this yet,” he said. “I’m in a position now to have influence, and through the association with Blue Apron we can do it at scale and have a serious impact.”

Niman’s 206-acre property does not look like the kind that could scale up, at least not in the way that most ranches do, by creating vast feedlots to fatten thousands of steer on grain. Emerald hills unfurl to the Pacific Ocean, and there’s a whiff of eucalyptus and salt on the breeze. On a sunny day in January, the pasture was thick with a mix of rye, clover and alfilaria, which were tufty, almost bouncy underfoot. The area, just 17 miles from San Francisco as the crow flies, is idyllic to more than cattle: Susie Tompkins Buell, the philanthropist and founder of clothing company Esprit, has a home here, as do director Joel Coen and his wife, Frances McDormand.

Bill Niman and Matt Wadiak in Tasmania in 2016. (Blue Apron)

Bolinas wasn’t always this way. In 1969, when Niman arrived, the town was a haven for hippies and dropouts. The son of a Minnesota grocer, Niman had come to teach school, his way of supporting President Lyndon Johnson’s War on Poverty. The first pigs he raised were to feed himself and his first wife, Amy, and to barter with the few neighbors who grew vegetables. (For many Bolinas residents, the primary crop was marijuana.) Bolinas was, and remains, according to Niman, perfect for folks who find Berkeley a little too right wing.

By the mid-1970s, raising hogs had somewhat surprisingly become a small business. Niman and his partner, Orville Schell (better known as a China expert and writer for the New Yorker,) got their big break when Mendocino chef Margaret Fox started to buy their meat and list the name of the ranch on the menu. It wasn’t long before they were selling to others, including Chez Panisse in Berkeley and Zuni Cafe in San Francisco. “It was unusual back then for a restaurant to say where their meat was from. It was a commodity world,” Niman said. “It wasn’t something we asked for. It just happened.”

Soon restaurants were clamoring to put Niman Ranch on their menus, and it wasn’t just white-tablecloth eateries. Steve Ells, founder and chief executive at Chipotle, came to Niman in search of pork that would boost sales of the chain’s carnitas. Niman took him on a tour of Iowa farms, patiently explaining how different protocols produced better-tasting meat. After switching to Niman’s pork, Ells was forced to raise the price of carnitas — a no-no in the world of fast food, but sales climbed nevertheless.

“Bill was instrumental in helping to establish the principles by which we purchase our food,” Ells said. “One million customers a day benefit from his really important vision to make this food available.”

Chef Mike Isabella, reflected in the work surface of his home kitchen, prepares a meal sent to him by Blue Apron, the online meal delivery service, in 2015. (Bill O’Leary/The Washington Post)

But there was a problem. Niman Ranch was losing money: nearly $3 million annually, according to Jeffrey Swain, then CEO of Natural Food Holdings, which took a controlling stake in 2006 and purchased the brand three years later. At the time, Niman told the San Francisco Chronicle that he had consciously deferred profitability to expand the brand; today he blames much of the losses on an executive who embezzled funds. Either way, the decisions that the new owners made — shipping cattle to commercial feedlots, for example — were unacceptable to Niman. “The people who bought us were conventional meat guys,” Niman said. “They offered me money to play Colonel Sanders for Niman Ranch. I wasn’t interested in that, so I left.”

The rift was heartbreaking. In 2008, Niman announced he would raise goats, and hoped to popularize the lean and sustainable meat. (He later abandoned that idea for cattle, his first love, and turkeys.) But he spent much of the next several years focusing on his new, growing family. His second wife, Nicolette, an environmental lawyer (and vegetarian), had their first son in 2009 and a second in 2013. Living in Bolinas, they were spoiled with “year-round, wholesome choices,” Niman said, but having children reinvigorated his desire to fix meat.

A Blue Apron grass-fed beef recipe, seared steaks and mashed potatoes with roasted Brussels sprouts and steak sauce. (Blue Apron)

The opportunity came when he met Matt Wadiak, Blue Apron’s co-founder and chief operating officer. Wadiak had known of Niman for decades; he remembers seeing him arrive at Oliveto, a renowned Oakland restaurant where he was cooking, with a pig slung over his shoulder. Blue Apron began buying meat from BN Ranch, and Wadiak peppered Niman with questions about how he could create a system that did more than just tick the right boxes but reflected what consumers think of as “sustainable.” Soon, the two were taking trips together to U.S. farms and as far afield as New Zealand and Australia. Last year, Wadiak says, the pair spent about 100 days together on the road.

Under Niman’s direction, Blue Apron will raise only grass-fed, grass-finished cattle. To provide the marbling that Americans expect, he will mandate British breeds, such as Black Angus and Hereford. The company will also require that animals are raised only in areas, such as Northern California and New Zealand, where grass thrives year-round. (If you were to raise cattle in, say, Vermont, the cattle must be fed forage and grain in the winter when there is no grass to eat.)

“Hyperlocal isn’t always a good thing,” said Wadiak. “We wouldn’t try to grow lemons in New York state. So why is it we’re not thinking about growing beef with the same thoughtfulness that we are growing lemons?”

Not everyone agrees. Chez Panisse’s Alice Waters has long supported Niman, though the two did famously fall out in the early aughts when she decided that she would serve only grass-fed beef and Niman’s was, at that time, finished on grain. Waters doesn’t like the idea of eating beef from halfway round the world, no matter how well it’s raised. “I’d rather go without beef” when it’s not in season, she said. “This country that wants beef every day is destroying the planet. So we need to make those decisions. And I think they are easy and delicious to make.”

Matt Wadiak, Matt Salzberg and Ilia Papas, co-founders of the recipe delivery service Blue Apron, at their office in New York City. (Yana Paskova/For The Washington Post)

Most Americans, though, are not ready to give up beef for most of the year. Niman is confident that with the right partners, scale is possible without ugly environmental trade-offs. “Only the right thing is good enough for Matt,” he says of Wadiak. “That’s what drives me.”

As compelling to Niman is that, in partnership with Blue Apron, he has the potential to bring down prices, making his kind of meat affordable. Where restaurants and retailers tend to want certain parts — pricey pork loins or rib-eye steaks — Blue Apron can buy the entire animal and write menus to use every piece: pesto meatballs one week for all that ground beef, and steak au poivre the next.

Buying the whole animal substantially lowers the cost of meat. But so do the enormous quantities that Blue Apron buys. This year, the company will purchase tens of thousands of grass-fed cattle, enough to fill big trucks for transport and gain access to large slaughterhouses. “The genius here is we are raising animals like a small farmer but gaining access to the most efficient processing and distribution,” Niman said.

“I have miles to go before I sleep on this one,” he added. “But we’ll get there.”