The company must also pay a $12.5 million fine and undertake two impact studies.
The ruling judge said the company "undoubtedly failed the community" by reacting to violations when it was caught, rather than obeying regulations in the first place.
The judge also said Tonawanda Coke's conduct was "inexcusable" and that the environmental manager "existed in title only".
In March, TC was convicted of 14 counts of violating the clean air act for releasing cancer-causing benzene into the air during the venting of coke oven gas.
The defense said Tonawanda Coke was "not a criminal enterprise" and said the fines should not be a "corporate death sentence."
The fines for each of the 14 violations totaled $295 million, but the judge ruled the company was only capable of paying $25 million.
The Environmental Protection Agency previously ordered Tonawanda Coke to make changes to reduce air and water pollution at its River Road plant.
According to the clean air coalition, the plant can remain open as long as it proves to the government it is making improvements to its environmental standards.