The results of a search for the direct pair production of top squarks, the supersymmetric partner of the top quark, in final states with one isolated electron or muon, several energetic jets, and missing transverse momentum are reported. The analysis also targets spin-0 mediator models, where the mediator decays into a pair of dark-matter particles and is produced in association with a pair of top quarks. The search uses data from proton-proton collisions delivered by the Large Hadron Collider in 2015 and 2016 at a centre-of-mass energy of √s=13 TeV and recorded by the ATLAS detector, corresponding to an integrated luminosity of 36 fb−1. A wide range of signal scenarios with different mass-splittings between the top squark, the lightest neutralino and possible intermediate supersymmetric particles are considered, including cases where the W bosons or the top quarks produced in the decay chain are off-shell. No significant excess over the Standard Model prediction is observed. The null results are used to set exclusion limits at 95% confidence level in several supersymmetry benchmark models. For pair-produced top-squarks decaying into top quarks, top-squark masses up to 940 GeV are excluded. Stringent exclusion limits are also derived for all other considered top-squark decay scenarios. For the spin-0 mediator models, upper limits are set on the visible cross-section.