In the epidemic prevention and control of infectious diseases, improper prevention and control can easily lead to a large-scale epidemic. However, the epidemic of diseases follows certain rules, so it is very necessary to simulate the spread of infectious diseases, which can provide reference for the formulation of prevention and control measures. This paper proposes a SEIDR model for analyzing and predicting epidemic infectious diseases. Taking the development situation of COVID-19 in New York City as an example, firstly, the SEIDR model proposed in this paper was compared with the traditional SIR model, and it was found that the SEIDR model was better than the SIR model. Then the SEIDR model and the L-BFGS optimization method were used to fit the early transmission data of COVID-19 in New York City, and important parameters such as infection rate, latent morbidity rate, disease-related mortality and recovery rate were obtained. Moreover, the value of basic regeneration number 𝑅0 between 4.0 and 4.6 proved that the situation of COVID-19 in New York City was relatively serious. Finally, these parameters were used to predict the future development of COVID-19 in New York City, and the turning point of COVID-19 in New York City was found. However, even if the turning point be reached, the development trend of COVID-19 will not be controlled in the short term. Data verification shows that the SEIDR model established in this paper can effectively provide a scientific quantitative index for governments in the prevention and control of COVID-19 and other epidemic infectious diseases.