It sounds simple. For nearly a decade, the venture capitalist Vinod Khosla has been fighting in court to keep the public off a piece of beach that abuts his property on the Pacific Coast. What could be more familiar than another case of rich Californian versus the oceangoing citizenry? But the first thing you need to understand about this absurd war is that it didn't begin with Mr. Khosla buying a beach house. Just south of Half Moon Bay, Mr. Khosla bought an entire beach village — forming a limited liability company that owned the land beneath about 47 cottages, and a little shop that at one point sold ice cream, and the only viable path to the sand. The next things to understand are that he bought the place on what he says was a whim, has never spent a single night there, and regrets it enormously. And the last thing — given that the case has wound itself to the Supreme Court, and could upend one of California's most sacred promises to its citizens — is that Mr. Khosla is willing to keep litigating this for the rest of his life and has about $3 billion to spend on it. Over the years, successive California titans have come up against the vexing fact that the beach cannot be privatized. The state constitution establishes that property below the mean tide line belongs to the public, and the Coastal Act of 1976 enshrines this, mandating that public access be maximized consistent with (and here is the tricky part) "constitutionally protected rights of private property owners." Mr. Khosla, through his LLC, is being sued by a nonprofit called the Surfrider Foundation over the matter of whether a permit is needed to block the road, and the thrust of his defense is that his property rights are being violated. If every generation in California gets the beach villain it deserves — if the producer David Geffen's battle in Malibu at the turn of the century epitomized the last, Hollywood-based era of wealth creation — then Mr. Khosla is the sandy antagonist of the digital age. Mr. Geffen, humiliated in the press and shamed by his community, eventually gave up his fight. But Mr. Khosla, who by cofounding Sun Microsystems cemented his place in history as an inventor of the commercial internet, seems immune to criticism. Almost since the day in 2008 that he bought the 53-acre hillside known as Martin's Beach, he has been in court, enduring attacks from multiple parties and crashing through obstacles using every legal tool available. He is driven by an almost manic belief that things must be done right and must be done fair. And somewhere along the line, the state of California triggered him. Now, by dint of his character, which ticks all the major boxes of the venture capitalist archetype — aggressive, shameless, obsessive, and optimistic — Mr. Khosla could disrupt the entire California coastal system. The stakes are both enormous and hilariously low. If he wins, he could reshape the laws that govern 1,100 miles of shore. And if he loses, all he would be forced to do is apply for a permit to change the hours of operation on a single gate. The legal volleys would undoubtedly continue; Californians do not easily give up a good surf spot. But the last person against whom to wage a war of attrition is Vinod Khosla.

'If This Hadn't Ever Started, I'd Be So Happy'

The tea awaits Mr. Khosla on a bright purple leather coaster. The glass walls of the conference room at Khosla Ventures, his investment firm, are the same shade. The banister too, the sofa downstairs, a hose cord outside, all that exact purple. Mr. Khosla is on time. He's 63 years old and thin, with close-cropped white hair, and when he pops into his chair he has no interest in small talk. We already know each other. Mr. Khosla is loath to give interviews about Martin's Beach, and it is certainly not in his best interest to do so, given that I've told him for years that he's making a fool of himself with this beach, a place he doesn't even like, and that his quest offends me, a native Californian. But now Mr. Khosla wants to tell his side. He wants me to know that he is right. And where some shy from conflict, Mr. Khosla seeks it, almost destructively. So he invited me to his purple lair. "A billionaire is a bad word in this country now," he says, as his tea cools. "And that pains me." Mr. Khosla has no public relations team, no one sitting in the corner eyeing us — and in Silicon Valley, there always is. Bad publicity, he says, cannot compel him to do anything he does not want to do.

He's wearing black jeans and white-soled slip-on walking shoes. He keeps his body open, friendly, leaning forward, sometimes swaying a bit. He holds long eye contact even as he's moving. He hops out of his chair frequently. Sometimes he feigns ignorance of what all the fuss is about. "I've never claimed people can't come in from the ocean," he says, seeming to suggest they swim around a rocky promontory. ("No, not death," he says, when I call later to clarify. "Boats.") Mr. Khosla says he does not even want to triumph. "If I were to ever win in the Supreme Court, I'd be depressed about it," he says. "I support the Coastal Act; I don't want to weaken it by winning. But property rights are even more important." He does not want the beach at all, really. He does not swim. For fun, he hikes. "I mean, look, to be honest, I do wish I'd never bought the property," Mr. Khosla says. "In the end, I'm going to end up selling it." "If this hadn't ever started, I'd be so happy," he adds. "But once you're there in principle, you can't give up principle." He frames the struggle in the Silicon Valley patois of contrarianism. "I'd rather do the right hard things now that I'm in," he says, "than the wrong easy things."

An Old-School Agitator

Early in his career, with Sun and then Juniper Networks, Mr. Khosla helped build the foundation of personal computing and global connectivity. But in more recent years, he has fashioned a new image as Silicon Valley's agitator. He doesn't golf with the other venture capitalists. He doesn't go to the Rosewood, their luxury hotel watering hole. He says food slows him down, so most days he fasts till dinner. His version of the inspirational Stanford Business School talk was to tell a class of 400 people that less than five percent of them were going to do relevant things in the end. He has said repeatedly that most venture capitalists are harmful to companies. "This is why I get unpopular with other VCs," he says. "Because I tell them they're not adding any value." Mr. Khosla's bluntness makes it difficult to find people who take his side of the Martin's Beach battle. Bring his name up around Sand Hill Road, the nexus of venture capital in Menlo Park, Calif., and people grimace. Email the friends he suggested you email, and the responses vary. "Vinod is deeply principled, and therefore sometimes difficult to work with," Jack Dorsey, the chief executive of Twitter and Square, wrote in an email. Mr. Khosla has been a mentor and adviser on both companies and is a frequent dining companion. (Mr. Dorsey also fasts until dinner.) "But that comes from a place of putting what he cares about above all else." Mr. Khosla advocates truth-telling at every juncture, even if it is painful. He calls the book "Lying," by Sam Harris, his philosophy for life. When he started Khosla Ventures in 2004, he put the phrase "I prefer brutal honesty to hypocritical politeness" on the website, and it has always been there. As an example, he brings up thank-you notes and how he instructs his longtime assistant, Ruthie, to handle them. "When somebody sends me a gift — I get a lot of gifts — I ask Ruthie to not say, 'That was wonderful,'" he says. "If it wasn't, I have her send a nice note back saying, 'Thank you, that was very interesting.'" Mr. Khosla is obsessed with things being just right. He designed the penholder in one of Khosla Ventures' conference rooms. He designed the door handles. He built the table. "We went through 12 manufacturing processes, and this was a vertical machine wire brush of Douglas fir," he says, rubbing his hands on it. The grass outside is fescue, and he chose it. There are flowers, and he picked every bulb. Mr. Khosla selected the species of bamboo that grows between them, and he designed the paper towel dispenser in the bathrooms. Shortly after he points out to me that there are no visible light switches in the building, we climb a set of stairs to the roof, and he jolts when he sees what looks like one of the accursed toggles. But the switch is just to open the glass ceiling, and we ascend to the prairie grass on the roof. (Fescue, thank god.) This obsessiveness actually works within Silicon Valley, where there is a culture of peculiar perfectionism. When technology executive Keith Rabois took a job as one of Mr. Khosla's partners, he says he did so in large part because of the whiteboards. "I walked in when I was interviewing, and I was like, 'Oh my god, I'm in love,'" Mr. Rabois recalled. "I've tried to put whiteboards in offices for years, and they always don't clean properly. But in our office, the whiteboards are immaculate. That alone makes me happy. And I knew I could work there every day." The "beach issue," as it is called internally at Khosla Ventures, has surprisingly not been a problem in the office. "It's an incredible negotiating tool for me," said Samir Kaul, another partner at Khosla Ventures. When a company was trying to "screw" the firm, Mr. Kaul brought up news articles about the beach at a meeting. "I said, 'My boss is going to the Supreme Court for a beach he's never gone to. We're not posturing here. This guy's not going to settle,'" Mr. Kaul said. "And then I just sat there."

'It's Really, Like, Wow'

Mr. Khosla's legal team now includes Paul Clement, the former United States Solicitor General, who since 2000 has appeared before the Supreme Court in more cases than any other lawyer. His skills are being applied to a dispute that began with the most minor of directives. After buying Martin's Beach, Mr. Khosla was told by the county that he had to either a) keep open a road that the public used to access the beach, and not charge more than the 1972-era rate of $2 a car for parking, or b) apply for a Coastal Development Permit to change access. He chose c) neither, and was sued by his fellow citizens. Mr. Khosla went on to sue the California Coastal Commission as an entity and its officers in their personal capacity. He sued the State Lands Commission and San Mateo County, and, again, its officers. He alleged extortion and infringement of his rights. In his view, the government was forcing him to operate a money-losing parking business. In one legal maneuver, he traced the property back to the 1848 Treaty of Guadalupe Hidalgo between the United States and Mexico, claiming it supersedes the Coastal Act. Mr. Khosla won, and for a time closed the gate across the beach road. California's legislature and governor stepped in to reopen the beach by passing and signing into law legislation to thwart Mr. Khosla. This move required purchasing an easement from him; the state lands commission estimated the cost at $360,000, but Mr. Khosla estimated at one point that his loss of privacy was worth at least $30 million. The parties remain at an impasse, and in June, California passed a budget that included language about using eminent domain to take the road if Mr. Khosla does not agree to a price. After a decade's worth of billable hours, those in legal combat with Mr. Khosla are somewhat awed by his determination. "All he had to do was apply for a permit to change the gate hours," said Angela Howe, the legal director at the Surfrider Foundation, a nonprofit that advocates beach access causes and is Mr. Khosla's primary antagonist. "It's really, like, wow," she said. "Now, if the Supreme Court takes it up, it could rule about every coastal management program in the United States."

The low point in the conflict was probably in 2012. Mr. Khosla hired guards to stand by the beach access road near a "Do Not Enter" sign, and the police arrested some surfers who hopped over the closed gate. Here was this peculiar billionaire. There were the charismatic surfers. Arrested, they became The Martin's Five. (The charges against them were ultimately dropped.) Mr. Kaul said that the forces arranged against his colleague simply do not comprehend how much flak he will absorb in his quest to win. "Here's the thing about Vinod," Mr. Kaul said. "He just doesn't care."

'You Could Say He's Principled'

Mr. Khosla was born in Pune, India, in 1955 and grew up the middle-class son of an army officer. He says his parents accepted his personality early on, though they also learned he could be a liability. "The priests would effectively say, 'If you donate this much money, God will bless you.' How crooked is that? If I ran into a priest, I'd say, 'Oh, you're a crook,'" Mr. Khosla says, recalling being 12 years old. After a master's degree in biomedical engineering at Carnegie Mellon University and an M.B.A. at Stanford Graduate School of Business, he founded the electronic design company Daisy Systems and then, in 1982, Sun Microsystems. The company sold servers and workstations and created Java, the programming language that formed the foundation for much of today's internet. Later, Mr. Khosla nurtured the creation of Juniper Networks, which built the routers and switches upon which the internet flourished. He became a hero of the political left last decade after investing early and heavily in clean technology, and by funding efforts in biofuel, energy storage and solar. Some of his bets succeeded; others failed spectacularly. He has continued to support and invest in eco-friendly start-ups. His life plan now is to "reinvent societal infrastructure." He's recently gotten interested in the Yimby movement, a pro-real estate development cause that stands for "yes in my backyard." Mr. Khosla wants to 3D-print houses for the homeless to be installed above parking lots. He sketches this for me on one of the perfect whiteboards. He wants people to think bigger, he says. Meanwhile, at Martin's Beach, he is pursuing a scorched-earth campaign around whether a gate needs a permit. In February, Mr. Khosla petitioned the Supreme Court to rule on his case, citing the First Amendment and also the Fifth (the takings clause) and Fourteenth (his right to due process). The justices are now deciding whether to hear the case. One recent cold summer Sunday, the rusty gate stood open. A few yards down, someone was collecting $10 from incoming cars. The cottages of Martin's Beach have windows that are thick with salt from the air; some of the houses are small and modest, with peeling paint, and others are more fixed up. The decks were full of barbecues, wicker furniture and driftwood art. David Pasternak, 66, was at home making smoked salmon. "If the Supreme Court wants to take the case, they want to go after the California Coastal Act," said Mr. Pasternak, whose family bought the cabin in 1960. "And that's a very serious thing." He took a sip of pour-over coffee. "What prompted California to pass the Coastal Act was so we didn't end up like the East Coast — miles and miles without access to the water," he said. "We live in a different country here." On some level, Mr. Pasternak admires Mr. Khosla's conviction. "He's become the caricature of the rich guy trying to keep people out, and that gives the Coastal Commission a lot of pleasure," Mr. Pasternak said. But, he added, "I don't think he's doing this for money. I really don't think he's doing this out of greed." "All they said was he has to apply for a permit, and he says, '[Expletive] you, I'm not going to apply at all,'" Mr. Pasternak said. "It's kind of — I mean, he's awfully sure of himself. You could say he's principled." Part of Mr. Khosla's original argument was that Martin's Beach was seldom used. The spot has become more popular as the case has gotten publicity, but on some days it resembles a ghost town. On a recent visit, the shop was long abandoned, with a rusty door handle that barely sat in its socket. Mr. Pasternak occasionally gets a knock at his door from beachgoers asking to use the bathroom. The one down at the beach collapsed in a storm. Mr. Khosla was ordered to open the gate, but no one said anything about running water.

A Legacy, Large and Small