The term was first used in 1829 to describe a popular sideshow act of two siblings from Southeast Asia that were joined at the stomach by a small stretch of skin.
In the 1800s, long sea voyages were very difficult and dangerous, so people were understandably hesitant to become sailors. But sea captains and shipping companies still needed crews to sail their ships, so they gathered sailors any way they could — even if that meant resorting to kidnapping.
The word “shanghai” comes from the name of the Chinese city of Shanghai. People started to use the city’s name for that unscrupulous way of obtaining sailors because the East was often a destination of ships that had kidnapped men for their crew.