Essar Oil Ltd had pleaded guilty at Chester Crown Court to three breaches of their environmental permit from incidents in 2012.
Oil and steam were released across parts of Ellesmere Port, including Overpool cemetery , after a storage tank at Stanlow failed on July 31, 2012.
Essar were fined £497,284 and ordered to pay £40,000 costs.
Judge Raj Shetty said: “In my judgement this fine will achieve the statutory purpose.
“The penalty is not only proportionate and just, but will bring home to the management and shareholders the need to protect the environment.”
Homes, businesses and vehicles across Ellesmere Port reported being covered in oil droplets after the incident .
Gravestones at the Overpool cemetery also needed to be cleaned.
The case also relates to a second incident where about five tonnes of oil entered Manchester Ship Canal on August 19, 2012.
This was caused by a failure in Essar’s system and caused the canal to be closed for two days.
Environment Agency representative Nigel Glasgow said: “These pollution incidents were significant events resulting in large numbers of complaints and clean-up costs for ESSAR.
“Permit breaches of this nature are taken seriously by regulators and the courts.
“Since these incidents we have worked closely with ESSAR who have improved their environmental performance and we look forward to their continued co-operation.”