The extinction rate of populations is predicted to rise under increasing rates of environmental change. If a population experiencing increasingly stressful conditions lacks appropriate phenotypic plasticity or access to more suitable habitats, then genetic change may be the only way to avoid extinction. Evolutionary rescue from extinction occurs when natural selection enriches a population for more stress-tolerant genetic variants. Some experimental studies have shown that lower rates of environmental change lead to more adapted populations or fewer extinctions. However, there has been little focus on the genetic changes that underlie evolutionary rescue. Here we demonstrate that some evolutionary trajectories are contingent on a lower rate of environmental change. We allowed hundreds of populations of Escherichia coli to evolve under variable rates of increase in concentration of the antibiotic rifampicin. We then genetically engineered all combinations of mutations from isolates evolved under lower rates of environmental change. By assessing fitness of these engineered strains across a range of drug concentrations, we show that certain genotypes are evolutionarily inaccessible under rapid environmental change. Rapidly deteriorating environments not only limit mutational opportunities by lowering population size, but they can also eliminate sets of mutations as evolutionary options. As anthropogenic activities are leading to environmental change at unprecedented rapidity, it is critical to understand how the rate of environmental change affects both demographic and genetic underpinnings of evolutionary rescue.