Mr Johnson was featuring as a “special guest” in Victoria Park, London, to ride the 1,050ft (320m) zip line, donning a hard hat and two Union flags as he attempted to sail down.
Instead, he ground steadily to a halt on the wire about 65ft (20m) from the end as the wire sagged, and was left dangling inelegantly in front of a watching crowd.
The Mayor spent around five minutes hanging comically from the drooping line wearing a hard hat, as spectators took video footage and photographs of his misfortune.
When one asked how he was feeling, he replied “very, very well thank you”, before shouting: "Get me a rope, get me a ladder" to bystanders.
“It’s very, very well organised,” he assured them. “It’s going well so far. Right.”
upload pictures
London Mayor Boris Johnson gets stuck whist trying out a zip wire in Victoria Park, London
According to eyewitnesses, he spent the intervening minutes waving his flags and leading the audience in cheering on British gold medal-winning rowers.
One member of the public shouted "I heard Ken Livingstone set up the zipline", as Mr Johnson responded: "This is great fun but it needs to go faster."
Eventually, staff came to his rescue and used a rope to tow him to the bottom of the line.
He later admitted: “I wouldn’t want to be up there all afternoon.”
When asked how he got stuck, he told ITV news: “I don’t know to be honest. I seemed to turn round. Possibly what had happened is that they left a brake on or something.
“But anyway, it was wonderful and I thoroughly recommend it.”
The cause of the incident has not yet been confirmed, but it is understood to be down to a "loss of momentum" as the wire sagged lower than expected. Other visitors to Victoria Park are believed to have since used it successfully.
A spokesman for Mr Johnson told reporters he "remained unbowed" by the incident, adding: "The judges will rightly be marking him down for artistic impression."