This Letter presents direct searches for lepton flavour violation in Higgs boson decays, H→eτ and H→μτ , performed with the ATLAS detector at the LHC. The searches are based on a data sample of proton–proton collisions at a centre-of-mass energy s=13 TeV, corresponding to an integrated luminosity of 36.1 fb−1 . No significant excess is observed above the expected background from Standard Model processes. The observed (median expected) 95% confidence-level upper limits on the lepton-flavour-violating branching ratios are 0.47% ( 0.34−0.10+0.13% ) and 0.28% ( 0.37−0.10+0.14% ) for H→eτ and H→μτ , respectively.