Bournemouth Crown Court heard Kier was commissioned by The Royal Bournemouth and Christchurch Hospitals NHS Foundation Trust to carry out redevelopment work at Christchurch Hospital in February 2012.
Kier appointed BKP Waste Recycling Limited to drain and remove oil from an oil supply line in the hospital grounds.
Oil escaped from a poorly-made connection in the oil supply pipework, which failed during routine testing of heating systems at the hospital in November 2014. The spillage polluted groundwater.
The case was bought by the Environment Agency at the end of a lengthy investigation that uncovered negligence on the part of both contractors.
Ian Withers of the Environment Agency said: “This pollution incident had the potential to cause serious harm to the environment and was entirely avoidable.
“The two companies failed to understand the extent of the work required and mitigate the risks.
“Construction companies must adhere to environmental permitting regulations to prevent their activities from affecting the local environment.
Kier was fined £100,000 with £30,301 costs for breaching the Environmental Permitting (England and Wales) Regulations 2010.
BKP was fined £10,200 for the same offence with £42,851 costs.
A Kier spokesperson said “We confirm that Kier has been fined at Bournemouth Crown Court in relation to an incident that occurred during 2014.
“Kier is fully committed to achieving high standards of environmental protection and regrets that on this occasion those high standards were not met.
“We continue to work collaboratively with our supply chain to strive for improvement in environmental standards and develop new ways of working.”