The mass of the top quark is measured using a sample of tt¯ candidate events with one electron or muon and at least four jets in the final state, collected by CMS in pp collisions at √s = 7 TeV at the LHC. A total of 5174 candidate events is selected from data corresponding to an integrated luminosity of 5.0 fb−1. For each event the mass is reconstructed from a kinematic fit of the decay products to a tt¯ hypothesis. The top-quark mass is determined simultaneously with the jet energy scale (JES), constrained by the known mass of the W boson in qq¯ decays, to be 173.49 ± 0.43 (stat.+JES) ±0.98 (syst.) GeV.