The story
Probably based on the practice of pedibus in sententiam ire in the Roman Senate, but the phrase in its modern sense was popularized by Lenin, through whom it gained some currency in left-wing parlance in various languages. It became more widely known when Western journalists and politicians started using it, not without mockery, in reference to those individuals who fled Communist East Germany towards the West between 1945 and the erection of the Berlin Wall in 1961.
Etymology from Wiktionary, CC BY-SA 4.0.