A direct search for the standard model Higgs boson decaying to a pair of charm quarks is presented. Associated production of the Higgs and Z bosons, in the decay mode ZH→ℓ+ℓ-cc¯ is studied. A data set with an integrated luminosity of 36.1 fb-1 of pp collisions at s=13TeV recorded by the ATLAS experiment at the LHC is used. The H→cc¯ signature is identified using charm-tagging algorithms. The observed (expected) upper limit on σ(pp→ZH)×B(H→cc¯) is 2.7 (3.9-1.1+2.1) pb at the 95% confidence level for a Higgs boson mass of 125 GeV, while the standard model value is 26 fb