Nowadays, search engine use increasingly reflects investor sentiment, which affects the return on the stock market. In this article, we examine the relationship between Baidu Index sentiment and China's stock market returns. In two different GARCH models, the benchmark model and a Baidu Index extended model, the one-step forward method is used to predict the return of stock market. The study finds that Baidu Index − search volume is a valid indicator for forecasting volatility in China's stock market. The Baidu Index extended model performs better than the benchmark model, both in periods of high volatility and periods of low volatility. These results are quite robust in Shanghai Stock Exchange, Shenzhen Stock Exchange, CSI 300 Index, and CSI 100 Index. This study shows that the investor sentiment reflected in the Baidu Index can be used as a good early warning indicator of China's stock market.