Using a sample of 185 Chinese IPO firms listed on the Shanghai Stock Exchange during the period 1999–2001, we show that related-party (RP) sales of goods and services could be used opportunistically to manage earnings upwards in the pre-IPO period. We also provide evidence that such behavior may be motivated by the prospect of tunneling opportunities in the post-IPO period, i.e., exploiting economic resources from minority shareholders for the benefit of the parent company. We provide evidence of one such opportunistic tunneling tool, non-repayment by Chinese parent companies of net outstanding corporate loans made to them by their newly listed subsidiaries. Furthermore, we provide evidence in support of our assertion of an association between such tunneling behavior in the post-IPO period and earnings management via abnormal RP sales in the pre-IPO period. Finally, we demonstrate the apparent failure of investors in Chinese IPOs to perceive the link between the two phenomena. The results enhance understanding of the motives for and consequences of earnings manipulation during the IPO process. They highlight a potential additional investment risk facing foreign investors in China’s capital markets as well as in Chinese firms cross-listed in non-Chinese stock exchanges, and have policy implications for China and other emerging markets which need to improve the protection of minority shareholders’ rights.