Interior Secretary Cecil D. Andrus yesterday announced the settlement of a major environmental lawsuit that had blocked leasing of federal coal lands in the West.

If approved by the U.S. District Court here, the settlement will allow the first significant leasing of the government's vast coal reserves since a 1971 moratorium halted a speculative boom in federal coal leases.

Coal production from federal lands, now 50 million tons a year, would increase by about 25 percent in the next 18 months. Andrus said the settlement "will make it easier to meet the goal of 1.2 billion tons of coal a year by 1985" -- a key element of President Carter's energy program.

Interior has also agreed to write a new environmental impact statement that, when completed in April 1979, would allow full-scale leasing of Western coal lands by the mid-1980s.

The settlement came after five months of negotiations with the four environmental groups -- the Natural Resources Defense Council, the Environmental Defense Fund, the Northern Plains Resource Council and the Powder River Basin Resource Council --against leasing last September.

Although a moratorium had been in effect for six years, the new administration had announced its intention to resume leasing under guidelines that environmentalists thought would result in damage to fragile Western land.

Representatives of 15 coal companies met with Andrus Friday in a last-minute effort to persuade him to appeal the September ruling National Coal Association President Carl Bagge yesterday denounced the settlement as "immoral" because it allows "a group of environmentalists to set leasing policy for the Department of Interior. Secretary Andrus has sold away the integrity of his office."

However, Bruce Terris, attorney for the environmentalists, praised the agreement as giving the government flexibility to allow leases in particular cases, without "compromising the principle that you don't go into a major program until you've analyzed it."

Terris said the Ford administration had planned to lift the moratorium and launch a major leasing program without examining the need for new leases or the environmental consequences. "We feel no major new leasing is necessary," he added. "Going to Western coal would have a devastating effect on the economy of Appalachia and Midwestern coal states as well as on the environment of the West."

Although the coal industry points to the halt in the leasing as a major impediment to replacing imported oil with coal, Andrus said yesterday, "We can meet the 1.2 billion ton production goal, but there has to be a demand" for coal. "That's where we need the energy bill to give incentives" to industry "for conversion" from oil.

Interior officials also point to the fact that roughly 16 billion tons of coal is already leased, but most of it is not under production because of logistical problems and the lack of demand.

Under the settlement, Interior would abandon its short-term leasing guidelines, limiting itself to 5 new leases, most of which would enlarge existing mines to prevent closings, the loss of federal coal or the inabitracts to utilities.

The 35 leases cover about 300 million tons of coal, for an annual production of 13 million to 17 million tons. Some of the leases will be issued within weeks. Interior officials said, with the remainder over the next 18 months.