The novel coronavirus epidemic, appearing at the end of December 2019, spread rapidly due to the large-scale population movement in the Spring Festival travel rush in 2020. Since January 23, 2020, China has taken various measures to effectively control the epidemic. For example, the closure of Wuhan, the tracking and isolation of close contacts of confirmed cases, and the home isolation of Hubei people, etc. Based on the actual transmission of novel coronavirus (COVID-19) in Shanxi province, a dynamic model was established for tracking and isolation of close contacts with imported and confirmed cases. Without regard to the imported cases, the dynamic behavior of the model was analyzed. By means of the case data of novel coronavirus in Shanxi province, the real-time reproduction number was calculated. It is found that the closure of villages and streets in Shanxi province on January 25, 2020 effectively controls the spread of COVID-19 epidemic, that is, the real-time reproduction number is less than 1, which verifies the effectiveness of prevention and control measures from a macro perspective. Further, through the numerical simulation of the model, it is concluded that the prevention and control strategy for early infected patients isolated for 14 days is reasonable and effective; the earlier the closure of Wuhan is, the smaller the scale of infected people will be; the larger number of tracked and isolated contacts of confirmed cases is, the smaller the size of the patients will be.