Observations of local star-forming galaxies have revealed a correlation between the rate at which galaxies form stars and their X-ray luminosity. We combine this correlation with the most recent observational constraints on the integrated star formation rate (SFR) density and find that star-forming galaxies account for 5–20 per cent of the total soft and hard X-ray backgrounds, where the precise number depends on the energy band and the assumed average X-ray spectral energy distribution of the galaxies below ∼20 keV. If we combine the LX–SFR relation with recently derived SFR function, then we find that star-forming galaxies whose X-ray flux falls well (more than a factor of 10) below the detection thresholds of the Chandra Deep Fields can fully account for the unresolved soft X-ray background, which corresponds to ∼6 per cent of its total. Motivated by this result, we put limits on the allowed redshift evolution of the parameter cX≡LX/SFR and/or its evolution towards lower and higher SFRs. If we parametrize the redshift evolution of cX ∝ (1 +z)b, then we find that b≤ 1.3 (95 per cent confidence level). On the other hand, the observed X-ray luminosity functions of star-forming galaxies indicate that cX may be increasing towards higher redshifts and/or higher SFRs at levels that are consistent with the X-ray background, but possibly at odds with the locally observed LX–SFR relation.