The long-term evolution of quasi-Keplerian systems is driven by a Hamiltonian that is independent of the fast angle. As this Hamiltonian may contain explicitly time-dependent parameters, the conservation of mechanical energy is not guaranteed in such systems. We derive how the semi-major axis evolves in these cases. We analyze two astrophysically interesting examples, those of the harmonic and quadrupole perturbations.