In Detroit, at their national convention last month, members of the American Bar Association (ABA) endorsed simplifying the tax code.

Meanwhile, in Washington, they were fighting a long and expensive court battle to preserve some of their tax breaks.

A former Internal Revenue Service commissioner, millions of dollars, reams of paper and thousands of billable hours are involved in the case, which is under appeal. Even attorneys with years of experience in the paper-work wars say the lawyers' tax case has generated an unusual amount of documentation.

"There certainly is a contradiction there" between all that effort and the idea of tax simplification, said Irving H. Plotkin, an economist with Arthur D. Little who testified for the government.

Tax simplification is intended to let people, companies and organizations spend their money based on economic factors, not on tax code factors.

At the Detroit ABA convention, members voted in favor of a resolution for tax simplification "to the maximum extent consistent with the need for equity, efficiency and the need for revenue . . . . "

Lawyers involved in the court case say that their efforts are not inconsistent with simplification, that they are merely seeking equitable enforcement of existing law. But, they add, the years of litigation have taken a toll.

"It has been very costly, no question about it," said Randolph W. Thrower, who was IRS commissioner from 1969 to 1971 and now leads a team of attorneys pleading the lawyers' case.

The dispute involves whether the ABA's research arm is a charity or an insurance company and whether part of the premiums paid to it are contributions that can be deducted by the ABA's 57,000 members.

It arose in 1968, when the IRS began looking at the organization, called the American Bar Endowment (ABE), and asking whether it should be subject to the unrelated business income tax. That tax is levied on profitable activities of tax-exempt organizations.

The ABE finances its activities by selling life, health and disability insurance to ABA members. The organization collects the money -- $14.1 million in 1981, the last year covered by the litigation -- and turns it over to insurance companies that provide the benefits.

But, according to court documents, the program has several significant differences from conventional insurance. The premiums are set high so there is an excess -- up to half of revenues -- that the ABE can use to fund its activities. Whether they are significantly higher than comparable market prices is one of the points of debate.

Lawyers, furthermore, are a cheap group to insure. As the Justice Department brief puts it, "because they tend to . . . get good nutrition and medical care, and because law is not among the physically hazardous occupations."

The endowment contends that its system is exempt from tax in two ways: It shouldn't have to pay tax on the excess revenue from insurance sales because they are contributions to a charity, and -- for the same reason -- members who buy the insurance should be able to deduct the amount of their premiums that don't cover insurance costs.

The Justice Department responds that the ABE is competitive with other insurance providers, is thus in the insurance business and owes $7 million in taxes for the three years at issue. The government also says that contributors have no choice about how much of their money goes for charitable purposes and thus aren't making a voluntary contribution.

Last year, U.S. Claims Court Chief Judge Alex Kozinski ruled that the ABE didn't have to pay tax but that ABE members couldn't deduct any part of their premiums. The Justice Department appealed the ruling on the tax and the ABE appealed the ruling on the deductions. The case is now before the U.S. Court of Appeals.

Oral arguments were held last month, but the final decision may be held up if the judges read all the documents. The transcript of the three-week trial contains 3,613 pages. There were 25 witnesses, and 472 exhibits. The number of pages involved in the case probably exceeds 10,000, one attorney said.