Five years ago when the Arabs slowed oil shipments to the U.S. Virginia officials responded with a novel program that made the state a major purchaser of fuel oil as a hedge against shortages.

Now, in the midst of investigations by U.S. and state agencies, top state officials privately are acknowledging that the program was mismanaged from the start and could become a rare, major political scandal in the state.

The investigations already have taken several unusual turns:

A U.S. Energy Department audit of state records disclosed that Virginia was overcharged "$2 million to $3 million" for fuel oil it bought under the program.

Almost 8 million gallons of the oil was allowed to oxidize before being used, an action that forced the state to take a $1.2 million loss on sale of the oil.

Gov. John N. Dalton fired Louis R. Lawson, director of the state's energy office, after a delegation of influential legislators and others complained about Lawson. Lawson has said he briefly hired his son and then arranged for him to get state unemployment benefits.

One of the key advisors to the state's program made commissions on the oil that he recommended that the state buy.

Virginia State Police made late evening seizures of massive amounts of records from the state energy office and other state agencies.

There have been recurring rumors that the program began under the administration of former Gov. Linwood Holton, was in trouble, but state officials have maintained until recently that it was a prudent hedge against statewide oil shortages.

First public confirmation of the overcharges came yesterday from John R. Settle, the area administrator for the U.S. Energy Department Settle said his office completed its audit of the Virginia operation late last year and that the results are being studied by the department's officials in Philadelphia and Washington.

Meanwhile, under orders from Gov. John N. Dalton, both the State Police and the state auditor have begun a wide-ranging, separate investigation into Lawson's operations. A high ranking state official said that officials now believe that the initial charges against Lawson were either groundless or frivolous. But the state's probe has now focused on more important questions of how the state's oil storage program and emergency allocation programs were run, he said.

Police moved into the energy office when it closed at 5 p.m. on May 8 to remove in the absence of office employes eight file cabinets of allocation orders and on the next morning police appeared at the office of Secretary of Commerce and Resources Maurice B. Rowe to request oil purchase records.

Those documents were removed over a three-day period from the State Department of Agriculture and Commerce, which keeps records of both oil purchases and office operations for the energy office.

Dalton's authorization of the investigation came a day after he fired Lawson as director of the energy office. The governor said "questions of propriety" had been raised about operations of the office.

The Energy Department's Settle said the overcharges to the state came on purchases of heating oil at prices up to 65.6 cents a gallon in the winter of 1973-74. Settle named Keystone Fuel Oil Inc. of Wilmington, Del., as one of the firms that charged Virginia more than federal laws allowed at that time.

Henry J. Staudinger, Washington lawyer of Keystone, said in an interview that his client denies overcharges the state. In 1975, the Federal Energy Administration, forerunner of the Energy Department, issued a formal notice of probable price violation by Keystone based on its sales to Virginia, but the notice was later rescinded. An Energy Department spokesman said the original audit on which the notice was based was found to be "defective." They just did some things in the wrong way," he said.

The spokesman, Gene Harris of the department's regional office in Philadelphia, said he could not say whether the new audits will lead to a new agency charge of price violations. "An audit is just a part of the investigative process," he said. "It is still being reviewed."

During the high oil price period of the Arab embargo, the state relied on Richmond oil distributor Ralph G. Roop, president of Petroleum Marketers Inc., to buy heating oil for the emergency reserve. Roop was paid about $25,000 in commissions for the purchases on which the state lost about $2 million, including its losers on operation of the New River depot. Part of the losses at Cheatham Annex resulted from a fire that destroyed its pier.

Settle called Roop's fee "modest compensation," but the distributor's dual role as purchasing agent and unofficial adivisor to Edward H. Isbell, a state official, on the program led in 1975 to a state attorney general's inquiry. A spokesman for the attorney general's office said it was concluded that there was no conflict of interest because Roop had no official voice in energy office decisions about oil purchases.

Lawson said in an interview that he had no control over the purchase of millions of gallons of fuel oil the state has stored at the Cheatham Annex depot on the York River since 1973. The Cheatham Annex operation was run by Isbell, once Lawson's deputy director in the energy office and now administrative assistant to Secretary Rowe.

Lawson said he once raised questions about the emergency oil storage program but was told by Rowe to leave the operation to Isbell.

Lawson also said he did not have direct control over the emergency fuel allocation program, saying it was run by Isbell and others in his office. Under that program, the state could allocate up to 3 percent of the petroleum supplies coming into Virginia to distributors unable to contract for fuel in the private market. Critics of the program have said that it puts states in a position to favor individual distributors.

Isbell refused to comment on any aspect of the oil storage and allocations programs "while the investigation is going on."

The "questions of property" alluded to by Dalton when he fired Lawson have never taken the form of official charges against him. In the interview, however, Lawson said he has been criticized for permitting his son to work in his office for seven days and then approving a $13 unemployment compensation voucher charged to the energy office when his son became unemployed.