The core of a neutron star contains several species of particles, whose relative equilibrium concentrations are determined by the local density. As the star spins down, its centrifugal force decreases continuously, and the star contracts. The density of any given fluid element increases, changing its chemical equilibrium state. The relaxation toward the new equilibrium takes a finite time, so the matter is not quite in chemical equilibrium, and energy is stored that can be released by reactions. For a neutron star core composed of neutrons (n), protons (p), and electrons (e), the departure from chemical equilibrium is quantified by the chemical potential difference delta mu = mu(p) + mu(e) - mu(n). A finite delta mu increases the reaction rates and the neutrino emissivity. If large enough (\delta mu\ greater than or similar to 5kT), it reduces the net cooling rate because some of the stored chemical energy is converted into thermal energy, and can even lead to net heating. A simple model (for nonsuperfluid matter) shows the effect of this heating mechanism on the thermal evolution of neutron stars. It is particularly noticeable for old, rapidly spinning stars with weak magnetic fields. If the timescale for variations of the rotation rate is much longer than the cooling time, a quasi-equilibrium state is reached in which heating and cooling balance each other and the temperature is completely determined by the current value of P/P-3 (or the spin-down power). If only modified Urea reactions are allowed, the predicted quasi-equilibrium X-ray luminosity of some millisecond pulsars approaches the upper limits obtained by Danner, Kulkarni, & Thorsett (1994) from ROSAT data. The predicted X-ray luminosity is much lower if direct Urea or other fast reactions are allowed. In both cases, the luminosity is probably increased if the stellar interior is mostly superfluid.