Mr Johnson wearing a hard hat and waving two Union Flags, tried out the 148ft (45m) high, 1,050ft (320m) long line as he visited Victoria Park in the capital.
Things seemed to go swimmingly at first. But as he reached the end of the line it rebounded before running out of momentum about 33ft (10m) above the ground.
The mayor was left dangling for about five minutes while a crowd of onlookers snapped photographs on their mobile phones. One shouted: “I heard Ken Livingstone set up the zipline.” Mr Johnson responded: “This is great fun but it needs to go faster.”
He spent his time cheering on Team GB athletes and encouraging tourists to visit London until staff pulled him to safety.