We propose to explain the recent observations of gamma-ray burst early X-ray afterglows with SWIFT by the dissipation of energy in the reverse shock that crosses the ejecta as it is decelerated by the burst environment. We compute the evolution of the dissipated power and discuss the possibility that a fraction of it can be radiated in the X-ray range. We show that this reverse shock contribution behaves in a way very similar to the observed X-ray afterglows if the following two conditions are satisfied. (i) The Lorentz factor of the material which is ejected during the late stages of source activity decreases to small values Γ < 10 and (ii) a large part of the shock-dissipated energy is transferred to a small fraction (ζ≲ 10−2) of the electron population. We also discuss how our results may help to solve some puzzling problems raised by multiwavelength early afterglow observations such as the presence of chromatic breaks.