The video shows other drivers pulling over as the emergency vehicle approaches with lights flashing and sirens blaring.
But the driver of a Vauxhall Zafira carries on towards the fire engine and only swerves on to the pavement at the last moment.
Mercifully, the stretch of pavement in Bathgate, West Lothian, was empty despite the incident happening on a Friday afternoon.
In the footage posted online by website Scotland’s Worst Drivers, the motorist is seen driving on the pavement to get back on to the road before speeding off again.
The Scottish Fire and Rescue Service confirmed that their vehicle was on its way to an electrical fire at a primary school.
A spokeswoman appealed to drivers to be aware of emergency vehicles on 999 calls and “take appropriate action”.
The incident was filmed by by James Johnston, 25, from Bathgate, using a dashcam.
The traffic coming in the opposite direction to Mr Johnston is nose-to-tail, leaving the approaching fire engine driver little option but to use the “wrong” lane.
The cleaner with West Lothian Council said: “I could hear the fire engine well before I saw it, and so the driver should have been aware that it was approaching.”
“I don’t think that he had any intention of stopping - there is no way that he didn’t see it and he just wanted to overtake me.
“I could see a male driver and a passenger in the car. I reckon he was going about 40mph in a 30mph zone and was about a foot away from the fire engine at one point.”
He added: “Unfortunately I didn’t catch the registration of the car and so I can’t report the incident.
“The driver was completely in the wrong, acted irresponsibly and the consequences could have been fatal if he hadn’t swerved out the way on time.
“I hate to think what could have happened at the school if there had been a collision.”
The Scottish Fire Service has confirmed that the fire engine was responding to an electrical fire at a local primary school at the time.
A spokeswoman said: “This incident highlights how important it is for motorists to be aware of approaching emergency services vehicles and take appropriate action to respond accordingly. If motorists are not alert or paying attention they can panic at the sound or sight of the blue lights and sirens.
“On this occasion our appliance was on its way to a call in a local primary school. Thankfully it turned out to be a small fire in a fuse box.
“Examples of clips like these are used by our emergency fire appliance driver instructors to help prepare and train our personnel for the unforeseen circumstances that can arise when responding to an emergency.”