We apply the time-dependent current-density-functional theory to the study of the relaxation of a closed many-electron system evolving from a nonequilibrium initial state. We show that the self-consistent unitary time evolution generated by the exchange-correlation vector potential irreversibly drives the system to equilibrium. We also show that the energy dissipated in the Kohn-Sham system, i.e., the noninteracting system whose particle and current densities coincide with those of the physical system under study, is related to the entropy production in the real system.