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 \rightarrow Wb$ branching fraction is set. The observed 95 % CL limit is $\sigma _{qg \rightarrow t} {\,\times \,} \mathcal {B}(t \rightarrow Wb)< {3.4}\,\mathrm{pb}$ and the expected 95 % CL limit is $\sigma _{qg \rightarrow t} \times \mathcal {B}(t \rightarrow Wb)< {2.9}\,\mathrm{pb}$ . 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 $\kappa _{ugt}/\Lambda < 5.8 \times 10^{-3}\, \mathrm{TeV}^{-1}$ and $\kappa _{cgt}/\Lambda < 13 \times 10^{-3}\, \mathrm{TeV}$ and on the branching fractions $\mathcal {B}(t \rightarrow ug) < {4.0 \times 10^{-5}}$ and $\mathcal {B}(t \rightarrow cg) < {20 \times 10^{-5}}$