The supermarket giant pleaded guilty to the incident in Haslingden, which occurred in July 2014,
It sparked a huge multi-agency operation involving the Environment Agency, Lancashire County Council, United Utilities, Lancashire Fire and Rescue Service and Lancashire Police.
Residents had to leave their homes due to petrol odours coming from the sewer network.
The Environment Agency’s joint investigation with partners found that the incident resulted from Tesco’s failure to address a known issue with part of the fuel delivery system and an inadequate alarm system and was compounded by poor emergency procedures.
Tesco were fined a total of £8m - £5m for the health and safety offence and £3m for the environmental offence.
The Environment Agency said between Wednesday, July 2 and Thursday, July 3, 2014. around 23,500 litres of petrol escaped from a petrol filling tank at a petrol station in Haslingden operated by Tesco.
Petrol entered the sewerage system with the odours affecting residents up to 1km away, causing people to seek medical attention with headaches and sickness. The odours remained in the homes for a number of days.
Some of the petrol also entered Langwood Brook and the River Irwell causing a significant environmental impact killing fish and other aquatic life.
Samples taken from the River Irwell detected oil up to three miles downstream.
More than 40 dead fish, including brown trout, were found within 1.5 miles of where the pollution entered.
Anglers reported dead fish in Bury, over six miles downstream.
About 23,500 litres of unleaded petrol leaked from the tank over a 29 hour period.
Around 7,000 litres was later recovered at the site and the remainder escaped into the sewer system and watercourse.
Mark Easedale, an environment manager for the Environment Agency, said: “This pollution incident had a dramatically negative impact on the local community and the environment with Langwood Brook and the River Irwell severely affected.
“A week after the pollution incident an investigation by Environment Agency officers found fish populations in the River Irwell immediately downstream of Langwood Brook were around 90% lower than those found upstream.
“The sentencing today sends out a clear message to anyone whose recklessness causes serious pollution to the environment – we will be relentless in our investigations and take action wherever needed.
“Our staff work 24/7 to protect people and wildlife from pollution incidents and we encourage people to report such incidents to the Environment Agency’s Incident Hotline on 0800 80 70 60.”
This prosecution was jointly carried out with Lancashire County Council and Tesco Stores Ltd also pleaded guilty to an offence under the Health and Safety at Work Act.
County councillor Albert Atkinson, deputy leader of Lancashire County Council with responsibility for Trading Standards, said: “This was a major leak of fuel in a relatively built-up area and close to a busy superstore. The potential consequences are only too obvious.
“The fact that the leak was allowed to continue for more than 24 hours undoubtedly contributed to a risk of harm to people living and working nearby, as well as emergency services and other professionals attending the incident.”