We use granular data covering regulated (brokerage-financed) and unregulated (shadow-financed) margin trading during the 2015 market turmoil in China to provide the first systematic analysis of margin investors’ characteristics, leverage management policies, and liquidation choices. We show that leverage constraints induced substantial forced and preemptive sales, and leverage and cash management differed substantially across investor and account types. We explore the relation between margin trading and shock propagation, and show that China’s price limit rule led to unintended contagion across stocks. Compared to brokerage investors, shadow investors were closer to their leverage constraints, and played a more significant role in transmitting shocks across stocks.