Paralytic polio once afflicted almost half a million children each year. The attenuated oral polio vaccine (OPV) has enabled world-wide vaccination efforts, which resulted in nearly complete control of the disease. However, poliovirus eradication is hampered globally by epidemics of vaccine-derived polio. Here, we describe a combined theoretical and experimental strategy that describes the molecular events leading from OPV to virulent strains. We discover that similar evolutionary events occur in most epidemics. The mutations and the evolutionary trajectories driving these epidemics are replicated using a simple cell-based experimental setup where the rate of evolution is intentionally accelerated. Furthermore, mutations accumulating during epidemics increase the replication fitness of the virus in cell culture and increase virulence in an animal model. Our study uncovers the evolutionary strategies by which vaccine strains become pathogenic and provides a powerful framework for rational design of safer vaccine strains and for forecasting virulence of viruses.