Attorneys for General Motors Corp. asked a federal judge today to halt a grand jury investigation into alleged tax fraud because of questionable conduct by Internal Revenue Service investigators.

Charging that it had been "treated like gangsters" GM attorney George Moscarino asked U.S. District Judge James P. Churchill to quash subpoenas issued by a federal grand jury on the grounds that the panel was being used illegally by the IRS.

But government attorneys said the jury had been convened because GM had "stymied" a five-month IRS effort to conduct a criminal investigation of possible tax fraud.

In the event that its request should be rejected, GM sought a court order that would prohibit the government from handing over evidence obtained by the grand jury to the IRS.

GM charged the jury was an illegal extension of a 1975 IRS civil investigation which which was expanded to a criminal investigaion last year - that the IRS was using the grand jury to make its task of collecting money easier.

IRS agents have said the GM employes may have intentionally made false statements concerning the accounting treatment of certain materials for tax purposes, resulting possibly in improper reduction in taxes by millions of dollars.

GM said IRs agents abused, harassed and intimidated company employes, abridged the constitutional rights of GM and its employes, and demanded documents that could not be produced in the time given.

The point of that, GM argued, was to make it look like the company was not cooperating so the IRS could call for a grand jury.

During a full morning of opening arguments, Moscarino charged that "This is not a grand jury; it is an IRS investigation under the guise of a grand jury." He said Congress had not intended to give the IRS the powers of a grand jury.

Moscarino said IRS investigators made it look like they were stymied in their investigation, because that is a condition for asking the Justice Department to intercede. The word "stymie" appears in IRS manuals as a condition for seeking a grand jury inquiry.

The dispute between GM and the IRS began in 1975 during a routine audit of the firm's 1972 tax return.

IRS agents questioned GM's tax treatment of "expense materials" - replacement parts and other items used in the manufacturing process that do not go into finished products.

GM has deducted the cost of those parts from taxable income as they were acquired, a method it said the IRS approved in 1944 and 1971.

The IRS asserts now that deductions for such items be taken only as the items are used.

The government, which is looking at tax years 1972 through 1975, has not said how much it believes GM might owe.

The IRS asked GM to estimate the value of its expense materials on hand, saying the value should be added to the firm's taxable income.

GM's estimate was $191 million. But the government said GM valued the parts for insurance at $465 million, and questioned if GM intentionally provided the IRS a low figure.

GM said the insurance estimate meant nothing for tax purposes because it included other materials. Also, for insurance, many items had to be valued at the cost of replacing them, a generally higher figure than what it cost to buy them.

GM paid more than $4.5 billion in federal income taxes for 1972 through 1975 and $2 billion in 1976 alone.

In 1976, GM earned $2.9 billion on sales of $47 billion. principally from the manufacture of 8.6 million cars, trucks and buses around the world.