Witnesses spotted the 16-year-old boy brandishing two bats at passing vehicles near the Dreghorn junction, just before 5pm on Saturday.
Terrified drivers said the youth – who had his hood up and face covered – was stumbling through slow-moving traffic in the eastbound lanes in the moments before the horror smash, approaching cars with the weapons in his hands.
A paramedic was seen chasing the teenager and trying to calm him down, before the youngster made a dash for the central reservation and jumped the wall to the other side – leaping straight into the path of an oncoming vehicle.
He was immediately struck by a blue Skoda travelling west and thrown around 20ft into the air. Onlookers described hearing a sickening “thud” as his body collided with the car.
One eyewitness said: “It was terrible driving conditions. We were driving along and just going really slow, and we put it down to the weather conditions.
“But when I looked further up, there was a guy on the road and he seemed to be brandishing some kind of weapon. My wife thought it looked like a crowbar.
“He had his hood up and you couldn’t see his face. He was all over the place, he was completely away with it. I don’t know if he was drunk or on drugs. He was staggering about, banging into cars.
“The next thing we saw was a paramedic chasing him, trying to calm him down. There was an ambulance parked about 100 yards up the road, across two lanes. The boy ran to the central reservation and the paramedic put his hands up as if to say, ‘I’m not chasing you any more’.
“But the boy climbed over the wall, jumped down and got hit by a car, and was thrown about 20 feet in the air. As soon as he jumped the wall, he got hit. The poor paramedic could not have done any more.
“All you heard was a really loud thud and then the guy went up in the air, and that was it. I can’t believe the guy is still alive.”
Sarah-Jane Nicholls, who had her young daughter in the car, feared the teenager was armed with guns.
She said: “The person was walking in between the two lanes on the City Bypass and was holding two black objects. From a distance I thought he was holding two guns, especially after these terror attacks. It was terrifying.”
Another witness said: “It all happened very quickly and it was dark, but he was stumbling through oncoming traffic. He was holding something in both hands – not sure what – but he was swinging them around and seemed very disorientated.”
The teenager was rushed to Edinburgh Royal Infirmary following the accident, where his condition was today described as “critical”.
Motorists faced delays as the junction was closed, with some reporting traffic jams lasting several hours.
Police refused to comment on the details of the incident, insisting inquiries were still ongoing “to establish the full circumstances surrounding this collision”.
Road policing sergeant Andy Gibb appealed for witnesses to come forward. He said: “We are asking anyone who may have witnessed this, or who has any other information which can help with our inquiries, to come forward.”