The company was supervising repairs to a gas main on 24 June 2014 when a worker was trapped between two gas pipes after one of them burst, breaking his femur.
He was part of a team trying to repair a reported leak on Ashby Road, Scunthorpe, when the pressure behind the escaping gas increased and ruptured the pipeline.
Footage of the incident shows how the fire service had zero visibility as they worked for an hour to rescue the trapped engineer, as the escaping gas was creating a cloud of dust and debris around the excavation.
The fact the worker was wearing breathing apparatus undoubtedly saved his life.
Ashby Road was closed to traffic and local residents had to be evacuated for fear of an explosion while it took three hours to get the gas under control and pipe repaired.
Sheffield Crown Court was told of a number of failings by National Grid Gas (Plc) including not complying with its own gas escape procedures, not carrying out sufficient risk assessments, not communicating effectively with the contractors carrying out the work and not managing the handover of key personnel.
The company was fined £1 million and ordered to pay costs of £26,296.
HSE Inspector Ian Redshaw, said: “This incident could easily have become a fatality.
“National Grid Gas (Plc) failed to follow its own processes and carry out sufficient risk assessments to protect workers and the sub-contractors fixing the leak.
“This whole incident should act as a stark warning to all those involved in hazardous work – you can have all the written policies in place but it you do not follow them, if you do not carry out the risk assessments for the task, people could die.”
Group Manager Steve Fraser of Humberside Fire and Rescue Service said: “The priority when we arrived was the injured man, and getting him out of immediate danger.
“The visibility was virtually zero due to air being dense with gas and dust, and the man had been working 10 feet below ground.
“The crews put themselves in a position which showed courage and bravery of the highest order. They were dealing with gas of an unknown quantity with potential for another explosion.
“They used pneumatic bags to prise the pipes apart and release his legs, all done in demanding circumstances.”