A search for single top-quark production via flavour-changing neutral current processes from gluon plus up- or charm-quark initial states in proton–proton collisions at the LHC is presented. Data collected with the ATLAS detector in 2012 at a centre-of-mass energy of 8 TeV and corresponding to an integrated luminosity of 20.3 fb−1 are used. Candidate events for a top quark decaying into a lepton, a neutrino and a jet are selected and classified into signal- and background-like candidates using a neural network. No signal is observed and an upper limit on the production cross-section multiplied by the t→Wb branching fraction is set. The observed 95 % CL limit is σqg→t×B(t→Wb)<3.4pb and the expected 95 % CL limit is σqg→t×B(t→Wb)<2.9pb. The observed limit can be interpreted as upper limits on the coupling constants of the flavour-changing neutral current interactions divided by the scale of new physics κugt/Λ<5.8×10−3TeV−1 and κcgt/Λ<13×10−3TeV and on the branching fractions B(t→ug)<4.0×10−5 and B(t→cg)<20×10−5.