Neurons exhibit a limited ability of repair. Given that mechanical forces affect neuronal outgrowth, it is important to investigate whether mechanosensitive ion channels may regulate axon regeneration. Here, we show that DmPiezo, a Ca(2+)-permeable non-selective cation channel, functions as an intrinsic inhibitor for axon regeneration in Drosophila. DmPiezo activation during axon regeneration induces local Ca(2+) transients at the growth cone, leading to activation of nitric oxide synthase and the downstream cGMP kinase Foraging or PKG to restrict axon regrowth. Loss of DmPiezo enhances axon regeneration of sensory neurons in the peripheral and CNS. Conditional knockout of its mammalian homolog Piezo1 in vivo accelerates regeneration, while its pharmacological activation in vitro modestly reduces regeneration, suggesting the role of Piezo in inhibiting regeneration may be evolutionarily conserved. These findings provide a precedent for the involvement of mechanosensitive channels in axon regeneration and add a potential target for modulating nervous system repair