Résumé : Context. X-ray observations of soft X-ray transients in quiescence suggest the existence of heat sources in the crust of accreted neutron stars. Heat is thought to be released by electroweak and nuclear processes triggered by the burying of ashes of X-ray bursts. Aims. The heating in the crust of accreting neutron stars is studied using a fully quantum approach taking consistently into account nuclear shell effects. Methods. To this end, we have followed the evolution of ashes made of 56 Fe employing the nuclear energy-density functional theory. Both the outer and inner crusts are described using the same functional, thus ensuring a unified and thermodynamically consistent treatment. To assess the role of accretion on the structure of the crust, we have employed the set of accurately calibrated Brussels-Montreal functionals BSk19, BSk20, and BSk21, for which the equations of state of nonaccreted neutron stars have been already calculated. These energy-density functionals were fitted to the same set of nuclear masses but were simultaneously adjusted to realistic neutron-matter equations of state with different degrees of stiffness at suprasaturation densities. For comparison, we have also considered the SLy4 functional. Results. Due to nuclear shell effects, the interior of fully accreted crust is found to be much less stratified than in previous studies. In particular, large regions of the inner crust contain clusters with the magic number Z = 14. The heat deposited in the outer crust is tightly constrained by experimental atomic mass data. The shallow heating we obtain does not exceed 0.2 MeV per accreted nucleon and is therefore not enough to explain the cooling of some soft X-ray transients. The total heat released in the crust is very sensitive to details of the nuclear structure and is predicted to lie in the range from 1.5 MeV to 1.7 MeV per accreted nucleon. Conclusions. The evolution of an accreted matter element and therefore the location of heat sources are governed to a large extent by the existence of nuclear shell closures. Ignoring these effects in the inner crust, the total heat falls to ∼0.6 MeV per accreted nucleon.