Extinction of disease can be explained by the patterns of epidemic spreading, yet the underlying causes of extinction are far from being well understood. To reveal a mechanism of disease extinction, a cellular automata model with both birth, death rate and migration is presented. We find that, in single patch, when the infection rate is small or large enough, the disease will disappear for a long time. When the invasion form is in the coexistence of stable spiral and turbulent wave state, the disease will persist. Also, we find that the migration has dual effects on the epidemic spreading. On one hand, in the extinction region of single patch, if the migration rate is large enough, there is a phase transition from the disease free to endemic state in two patches. On the other hand, migration will induce extinction in the regime, which can ensure the persistence of the disease in single patch, due to emergence of anti-phase synchrony. The results obtained well reveal the effect of infection rate and migration on the extinction of the disease, which enriches the finding in the filed of epidemiology and may provide some new ideas to control the disease in the real world.