Separately, Denver-based PDC Energy Inc. agreed to pay $22.2 million after storage tanks were found to be leaking smog-forming compounds.
The cases are among the most notable environmental enforcement actions by the Trump administration, with at least one target that hits close to home. Secretary of State Rex Tillerson was chief executive officer at Exxon until late last year.
Environmental Protection Agency Administrator Scott Pruitt has vowed to get tough on corporate polluters.
The Exxon case involved thousands of tons of toxic air pollutants such as benzene that streamed from 26 industrial flares at five Texas facilities and three in Louisiana, according to a Justice Department statement released on Tuesday. The violations stretched as far back as 2005.
Under the settlement, Exxon will spend $300 million in new anti-pollution and monitoring gear, pay a $2.5 million fine and spend $1 million to plant trees around its Baytown, Texas, plant.
"These investments, which include flare monitoring equipment and flare gas recovery systems, will help improve flare efficiency at these chemical facilities, which are among the largest petrochemical complexes in the world," Aaron Stryk, an Exxon spokesman, said in an e-mailed statement. "Exxon Mobil complies with environmental laws, regulations and permits."
In June, the Trump administration filed a civil lawsuit alleging that PDC repeatedly violated the Clean Air Act and Colorado air pollution rules by allowing volatile organic compounds to escape from more than 80 groupings, or batteries, of condensate storage tanks near Denver.
The EPA alleged that PDC failed to adequately design, operate and maintain control systems on those tanks, resulting in the leaks and contributing to a smog problem in the area, where ozone levels exceed federal limits. The case was brought at the request of the EPA and Colorado authorities, following state inspections from 2013 through 2015.
PDC owns and operates hundreds of oil and gas production facilities in Colorado's Denver-Julesburg Basin.