We present an in-depth study of the two components of the binary system LZ Cep to constrain the effects of binarity on the evolution of massive stars. We analyzed a set of high-resolution, high signal-to-noise ratio optical spectra obtained over the orbital period of the system to perform a spectroscopic disentangling and derive an orbital solution. We subsequently determine the stellar properties of each component by means of an analysis with the CMFGEN atmosphere code. Finally, with the derived stellar parameters, we model the Hipparcos photometric light curve using the program NIGHTFALL to obtain the orbit inclination and the stellar masses. LZ Cep is a O9III+ON9.7V binary. It is as a semi-detached system in which either the primary or the secondary star almost fills up its Roche lobe. The dynamical masses are about 16.0M☉ (primary) and 6.5M☉ (secondary). The latter is lower than the typical mass of late-type O stars. The secondary component is chemically more evolved than the primary (which barely shows any sign of CNO processing), with strong helium and nitrogen enhancements as well as carbon and oxygen depletions. These properties (surface abundances and mass) are typical of Wolf-Rayet stars, although the spectral type is ON9.7V. The luminosity of the secondary is consistent with that of core He-burning objects. The preferred, tentative evolutionary scenario to explain the observed properties involves mass transfer from the secondary - which was initially more massive- towards the primary. The secondary is now almost a core He-burning object, probably with only a thin envelope of H-rich and CNO processed material. A very inefficient mass transfer is necessary to explain the chemical appearance of the primary. Alternative scenarios are discussed but they are affected by greater uncertainties.
stars: early-type - binaries: general - stars: fundamental parameters - stars: winds, outflows