This paper investigates whether and how the research reports issued by securities companies affect stock returns from the perspective of investor sentiment in China. By collecting research reports and investor comments from a popular Chinese investor community, i.e., East Money, we derive two indices that represent the information contained in research reports: one is the attention of research reports and the other is the average stock rating given by research reports; then we develop an investor sentiment indicator using the machine learning method. Based on behavioral finance theory, we hypothesize that research reports have a significant effect on stock returns and investor sentiment plays a mediating role in it. The empirical analysis results confirm the above hypotheses. Specifically, the average stock rating given by research reports can better predict future stock returns, and investor sentiment plays a partial mediating role in the relationship between stock rating and stock returns.