Capital Asset Pricing Model (CAPM) is developed on the basis of Modern Portfolio Theory and Capital Market Theory, which mainly describes the relationship between expected return of assets and risky assets. CAPM is one of the most important models in the financial field, and it is also the theoretical basis of asset pricing in financial market. In this paper, we first get the Capital Asset Pricing Model by mathematical derivation, and apply it to solve the asset pricing problem, and analyze its applicable conditions. On this basis, this paper uses the stock trading data of Shanghai Stock Exchange to make an empirical research on the model. The research results show that from January 1, 2016 to December 31, 2020, there is a positive correlation between the excess return and the systemic risk of the stock portfolio, which is the same as the expectation of Capital Asset Pricing Model, but the intercept term is not zero, which shows that the model is only suitable for the stock market in the recent five years, but not necessarily for all the stocks in the market.