Under changing climatic conditions, species need to adapt to their new environment. Genetic adaptation is crucial to prevent population extinction1 but examples where climate change leads to genetic changes in wild populations have been few2, 3. The synchronization between the timing of egg hatching of a herbivorous insect, the winter moth (Operophtera brumata), and the seasonal bud burst of its food plant, oak (Quercus robur), has been disrupted by climate change4 and a quantitative genetic model predicts that selection will delay the egg hatching date5. Here we show, using both long-term observational data and experiments, that the egg hatching date has changed genetically, resulting in closer synchrony with oak bud burst. The observed rate of change matches the predicted rate of change of one day per year. Hence, altered selection pressures, caused by environmental change, result in a rapid adaptive response in insect phenology. These genetic changes in a key life-history trait in this herbivorous insect therefore seem to be fast enough to match the climate-change-induced advancement of their host phenology.