Nati Harnik/Associated Press

Get this: Uncle Sam is suing Warren Buffett’s company over taxes. Yes, taxes.

The United States government, in a little-followed case in Ohio, filed a lawsuit this month against a unit of Mr. Buffett’s Berkshire Hathaway, seeking $366 million in taxes and penalties. The Berkshire division at the center of the suit is NetJets, the private-aircraft company that caters to the nation’s wealthiest — the people Mr. Buffett says should pay more in taxes.

It is an odd twist that a company controlled by Mr. Buffett — perhaps the most outspoken businessman in the country in support of raising taxes on the “mega-rich” — is now in a dispute with the government over his company’s paying too little in taxes.

Perhaps more important, the case is a remarkable window into the nation’s byzantine tax code. It is an arcane dispute that raises questions about the Internal Revenue Service’s interpretation and enforcement of its own tax rules. And it shows why even someone like Mr. Buffett would seek to challenge them.

“It’s funny — it’s a great irony,” Keith G. Swirsky, a lawyer at GKG Law who runs the firm’s aviation practice. And on the merits of the case, Mr. Swirsky, who is not involved in the litigation, said: “He’s got an excellent argument,” adding, “He shouldn’t pay taxes that are not properly due.”

At the heart of the tax battle is whether NetJets and a sister division should have collected a special transportation tax — often called a “ticket tax” — from the fractional owners of its fleet. (Fractional owners own a stake in a private jet, entitling them to a certain number of flight hours a year, in a way that’s similar to someone owning a time-share vacation property.)

You and I — the rest of us who fly commercial — pay a federal excise tax when we fly (7.5 percent of the ticket price plus $3.80 for each leg of travel.) People who own an entire plane outright have not been subject to the same tax since, ostensibly, there is no ticket to buy.

The air gets a lot foggier when it comes to fractional owners.

The rules are so complicated that the I.R.S. issued a memorandum this month seeking to clarify its interpretation of its own rules. The I.R.S. said it considered “possession, command and control of the aircraft” as main factors in determining whether an airplane is really owned, and therefore whether a tax is owed or not.

In instances in which an owner — whether a single owner of a plane or fractional owners — uses a management company that “exercises virtually all decision-making with regard to the operation and maintenance of the aircraft,” it concludes that “management provides taxable transportation to owner.”

As a result, the government contends, NetJets owners should be required to pay transportation taxes on two fronts — a levy on the fees for putting the plane in the air and another levy on the fees for maintenance.

NetJets has been collecting the first tax from owners since 2003, when a court ruled that it should collect tax on the fees that owners pay for their flight hours. The court determined that such management programs amounted to “essentially air charter, not true aircraft ownership.”

However, the court did not rule on whether management companies should also collect a tax on monthly management fees for taking care of the planes, too, which often can be higher than the hourly flight fees.

Now, NetJets and its sister division, which have filed their own suit against the I.R.S., say they “are stuck with a $642 million-plus bill for past taxes the I.R.S. never indicated they were required to collect.”

Further, Mr. Buffett’s companies say that if the government really wants to collect the tax, it shouldn’t send the bill to them; it should send the bill directly to the thousands of plane owners.

NetJets, in a court filing, argues that “the ticket tax was not intended to apply to private aircraft owners and the fees they pay to maintain and operate their aircraft. Unlike a commercial or charter passenger, an owner owns the aircraft that is providing the transportation, and thus an owner transports himself when he flies on his own aircraft, even if he pays others to assist him in maintaining and operating the aircraft.”

Some experts suggest that the case is open and shut — against NetJets. “On the face of it, NetJets’ argument seems plausible,” said Reuven S. Avi-Yonah, a professor at the University of Michigan and expert in international tax law. But he said that because a court ruled in 2003 that NetJets owners were not true owners, avoiding the maintenance levy might be an uphill climb. “The same argument was made and rejected by the same party,” he said. “This seems conclusive to me.”

Got all that? It’s the kind of case only a lawyer would love. (As luck would have it, the NetJets chief executive, Jordan Hansell, is a former lawyer who clerked for Justice Antonin Scalia of the Supreme Court.)

Mr. Buffett declined to comment, referring questions to NetJets. Mr. Hansell said: “NetJets does not comment on pending litigation.”

However you feel about the litigation — whether you think the tax is due or not — it underscores the arbitrary and complex nature of our tax system and demonstrates why it needs to be fixed with simple and clear rules.

At a time when the government is desperately looking to raise revenue, it is understandable that the I.R.S. would seek to wring additional dollars out of the private jet industry, but there has to be a better way than to do it through reinterpreting arcane rules in court. If Congress wants to apply the transportation tax to private jet owners — which would probably be applauded by many people — it should pass a clear law that says so.

As I was speaking with various people about the issue, many of them said that given Mr. Buffett’s personal position on taxes, Berkshire should just settle the case. But that misses the point: Mr. Buffett may have his own views on income taxes, but in this instance, he represents shareholders and NetJets owners.

Howard Gleckman, a resident fellow at the Tax Policy Center who has often advocated for higher taxes for the rich, like Mr. Buffett, said: “Like any taxpayer, NetJets is interpreting an ambiguous statute in the most favorable way possible.” But, he pointed out, “the Buffett rule is not about current law.” He continued: “I don’t think it is hypocritical to take full advantage of existing law while, at the same time, urging that the law be changed.”