Allied Chemical Corp. paid the Virginia government $5.25 million today to settle all but two major environmental damage claims resulting from the manufacture of the pesticide, Kepone.

The payment brings to about $18 million the publicly announced penalties or settlements agreed to by Allied since Kepone production was shut down in July, 1975. Nevertheless, the huge chemical company reported yesterday net earnings of $19.8 million in the third quarter of this year, compared to only $10.3 million in the same period last year.

Gov. Mills E. Godwin said the latest Allied payment covers costs incurred so far by the state the city of Hopewell in dealing with Kepone pollution of the James River and damage caused by the pesticide to the city's sewage disposal plant.

Godwin said Allied and the state have left to future negotiations, or possible lawsuits, what the company will pay for acutal removal of Kepone from the waters and sediment of the lower James River and disposal of Kepone residue collected at Hopwell.

Allied chairman John T. Connor handed the company's check for $5.25 million to Godwin after a joint news conference in the Capitol here.

U.S. District Court Judge Robert R. Merhige fined the company $13.2 million for violation of federal pollution laws last January. He later reduced the fine to $5 million after Allied agreed to establish an environmental trust fund with a donation of $8 million.

Even the reduced fine was a record criminal penalty against a U.S. corporation.

Allied also has settled many of the personal injury claims filed against it by approximately 75 persons who were affected by the highly toxic pesticide. Most of these were production workers at the plant manufacturing Kepone and members of their families.

Still left to be settled or decided by a court are additional personal injury claims, claims by about 400 watermen who make their living fishing the lower James River and claims by larger commercial fishing companies that operate in the James and the Chesapeake Bay.

Godwin said that Allied and the state agreed to postpone settlement of any claims for removing Kepone from the James for up to three years to give scientists more time to recommend feasible removal methods. He said it still is not known whether dredging or any other method will be feasible or whether removal from the river is necessary.

The governor has enforced a partial fishing ban on the lower James and its tributaries since late 1975, when Kepone was discovered in fish samples taken from the river.

The only fish of major commercial importance in the lower James, seed oysters that are transplated to other rivers to mature was never affected by the ban.

Settlement of claims for the cost of disposing of Kepone residue collected at the Hopewell plant site and at the city's sewage plant also will await completion of feasibility studies and experiments, Godwin said.

Godwin has called the Kepone episode the most vexing problem he has faced in his two terms as governor. However, negotiation with Allied, one of the state's major employers, apparently have been amicable.

Godwin has referred to the company in an earlier press conference as "a good coporate citizen." He repeated his praise today.

When Merhige fined Allied, he said he was sending a warning to other companies, but after Allied set up the environmental fund, called the Virginia Environmental Endowner, the judge said Allied officials "are good boys in my book."

ALled began manufacturing Kepone at its Hopewell plant south of Richmond in the mid-1960s, and later contracted for its production by Life Science Products co., small firm organized by two former Allied employees.

Kepone poisoning has caused severe tremors in some Life Science workers. Doctor treating workers have said there is a danger that the presence of Kepone their blood may someday cause cancer.