The chemical composition of stellar photospheres in mass-transferring binary systems is a precious diagnostic of the nucleosynthesis processes that occur deep within stars, and preserves information on the components' history. The binary system u Her belongs to a group of hot Algols with both components being B stars. We have isolated the individual spectra of the two components by the technique of spectral disentangling of a new series of 43 high-resolution echelle spectra. Augmenting these with an analysis of the Hipparcos photometry of the system yields revised stellar quantities for the components of u Her. For the primary component (the mass-gaining star), we find M-A = 7.88 +/- 0.26 M-circle dot, R-A = 4.93 +/- 0.15 R-circle dot and T-eff,(A) = 21 600 +/- 220 K. For the secondary (the mass-losing star) we find M-B = 2.79 +/- 0.12M(circle dot), R-B = 4.26 +/- 0.06 R-circle dot and T-eff,T- B = 12 600 +/- 550 K. A non-local thermodynamic equilibrium analysis of the primary star's atmosphere reveals deviations in the abundances of nitrogen and carbon from the standard cosmic abundance pattern in accord with theoretical expectations for CNO nucleosynthesis processing. From a grid of calculated evolutionary models the best match to the observed properties of the stars in u Her enabled tracing the initial properties and history of this binary system. We confirm that it has evolved according to case A mass transfer. A detailed abundance analysis of the primary star gives C/N = 0.9, which supports the evolutionary calculations and indicates strong mixing in the early evolution of the secondary component, which was originally the more massive of the two. The composition of the secondary component would be a further important constraint on the initial properties of u Her system, but requires spectra of a higher signal-to-noise ratio.