Charged Higgs bosons produced either in top-quark decays or in association with a top-quark, subsequently decaying via H± → τ±ντ, are searched for in 36.1 fb−1 of proton-proton collision data at √s = 13 TeV recorded with the ATLAS detector. Depending on whether the top-quark produced together with H± decays hadronically or leptonically, the search targets τ+jets and τ+lepton final states, in both cases with a hadronically decaying τ-lepton. No evidence of a charged Higgs boson is found. For the mass range of mH± = 90–2000 GeV, upper limits at the 95% confidence level are set on the production cross-section of the charged Higgs boson times the branching fraction B(H± → τ±ντ) in the range 4.2–0.0025 pb. In the mass range 90–160 GeV, assuming the Standard Model cross-section for t¯t production, this corresponds to upper limits between 0.25% and 0.031% for the branching fraction B(t → bH±) × B(H± → τ±ντ).