In this paper, an SEAI epidemic model with asymptomatic infection is studied under the background of mass transmission of COVID-19. First, we use the next-generation matrix method to obtain the basic reproductive number R0 and calculate the equilibrium point. Secondly, when R0<1, the local asymptotic stability of the disease-free equilibrium is proved by Hurwitz criterion, and the global asymptotic stability of the disease-free equilibrium is proved by constructing the Lyapunov function. When R0>1, the system has a unique endemic equilibrium point and is locally asymptotically stable, and it is also proved that the system is uniformly persistent. Then, the application of optimal control theory is carried out, and the expression of the optimal control solution is obtained. Finally, in order to verify the correctness of the theory, the stability of the equilibrium point is numerically simulated and the sensitivity of the parameters of R0 is analyzed. We also simulated the comparison of the number of asymptomatic infected people and symptomatic infected people before and after adopting the optimal control strategy. This shows that the infection of asymptomatic people cannot be underestimated in the spread of COVID-19 virus, and an isolation strategy should be adopted to control the spread speed of the disease.