U.S. District Judge Robert R. Merhige, hailing Allied Chemical Corp. as "good boys in my book," today cut the record $13.2 million Kepone pollution fine he had leveled against the chemical company to $5 million.

His descision, made despite objections from the Justice Department, came four days after Allied lawyers had disclosed that the company was giving $8 million to a Virginia environmental fund in the hope of securing a lower fine.

In sharp contrast t the bitting comments Merhige delivered Oct. 5 when he fined the company for secretly polluting Virginia's James River with Kepone and other chemical wastes, the judge today went out of his way to praise Allied executives.

Borrowing a phrase from Gov. Mills E. Godwin, Merhige said he had no doubt that Allied "has been a good corporate citizen" until the Kepone incident was discovered and said the corporation deserved credit for establishing the environmental fund.

Even so, he said Allied Chemical will end up spending more than the orginial $13.2 million fine because of other money it has had to pay out as a result of the damage Kepone has done to Virginia.

Despite the reduction, the fine is the largest ever imposed in a federal pollution case. Justice department officials have said. The previous record penalty in a pollution case was about $7 million, imposed against automobile manufacturers, but only about $3.5 million of that represented criminal penalties, according to Justice Department officials. The remainder of that 7 million penalty represented civil damages, they have said.

Although a record for a pollution fine, the size of the Allied penalty is relatively insignificant compared to the amount of business done by Allied a point prosecutor William B. Cummings attempted to make today when he described the company, as "a giant in its field" that needed a large fine. In 1976, Allied reported sales of $2.62 billion and met earnings of $112.1 million.

In reducing the fine, Merhige appeared to be rejecting final arguments from Cummings, who argued that the Kepone pollution was "deliberately done . . . in callous disregard" for the environment Cummings said he Justice Department, as a matter of principle, disapproved of the fund's establishment and believe the reduction should be "nowhere near" a dollar-for-dollar reduction for the size of the fund.

Allied vice chairman Alexander B. Trowbridge, who was in the court as Merhige announced his decision, later told reporters Allied was "very gratified indeed" by the reduction. "It was a very fair and very justified" action, he said.

However, he conceded that since the $8 million contribution will be considered by Allied as a charitable donation, he actual cost to Allied of the gift - "after taxes" - will be $4 million.

In addition, Trowbridge said Allied faces additional costs growing out of the Kepone pollution, which forced Godwin in December, 1976, to close the lower James River to fishing interests and which has severely cut into sales by Virginia's fishing industry. Allied's legal fee fighting criminal and civil lawsuits over the pollution have amounted to $1.9 million "and the clock is still ticking," Trowbridge said.

Merhige indicated that Allied would be paying more than the original $13.2 million fine because of the actual $5 million fine, the $8 million environmental the costs of demolishing a small Kepone plant in Hopewell, Va., that made the pesticide for Allied and its grant to the Medial College of Virginia to study Kepone's effects. The demolition and the medical grant added another $356,202 to Allieds current Kepone costs.

At today's hearing Cummings, the young Northern Virginia lawyer who had prosecuted the government's case against Allied, voiced objections to establishment of the fund because of the tax break it would give Allied. But his objections got nowhere with Merhige.

"There is nothing un-American about trying to reduce your taxes," the judge told Cummings at one point. The tax benefit Allied will gain from the donation will be "infinitesimal" compared to its total tax bill, Merhige said.

Allied had pleaded no contest last year to 940 counts of secretly dumping Kepone and other chemical wastes in the James River from its Hopewell complex from 1971 and 1974. A highly toxic presticide that has been shown to cause cancer in test animals, Kepone has shown up in fish taken from the river and the lower Chesapeake Bay.

It also caused the sickness of nearly 75 chemical workers who worked at a small, makeshift plant in Hopewell that made the chemical for Allied, an international corporation based in Morristown, N.J.

"I agree it was a horrendous case," Merhige said today, "But I cannot believe that the board of Allied sat somewhere in New Jersey and said, 'Let's go pollute.' That did not happen."

Merhige said he was ordering the reduction only after he had satisfied himself that "not one penny" of the Allied environmental fund would be used to fund any project for which Allied itself could be held liable because of its ties to Kepone.

Allied laywer Murray J. Janus told Merhige "the (Allied) board has spoken" and that neither Allied attorneys nor the judge was empowered to change the purposes of the fund, to be administered by a private, nonstock Virginia corporation.

The judge immediately announced the appointment of four of the seven directors of the Fund, including Cummings, who will be "the watchdog" over the fund's expenditures. The three other directors named are Richmond banker George Yowell, and Richmond businessman and philanthropist Sydney Lewis and his wife, Frances Lewis.