It involved assembling a number of corpses that needed to be delivered to a specific village or region. Taoist priests (or people calling themselves Taoist priests) would begin by praying and chanting over the dead so as to “possess” them into walking.
Much of this was for show, so that people would believe that the corpses were actually being reanimated, and that they should keep their distance. It was all part of setting the stage for a swift, uninterrupted transport of the dead. It also added to the priests’ status and aura of mystery if people believed they actually had powers over corpses.
In practice, corpses would be tied to bamboo poles, one on either side of their upright bodies. Then, the ends of each pole would be hoisted onto the shoulders of a man at the front of the line, and a man at the back of the line, and off they would go.
As the men walked with the poles on their shoulders, it appeared as if the dead were shimmying, shaking, and hopping along on their own. A priest would head up the front of the procession and ring a bell or beat a gong in order to warn people of the coming dead.
This gave folks a chance to hide themselves or look away, as encountering the dead in Chinese belief is bad luck. Plus there was also the whole “steal your Chi/be my Ghost Bride” thing to contend with.