The present invention provides an agent for preventing or treating neuropathy having superior action and low toxicity. This agent comprises a compound represented by the formula: wherein ring A is a 5-membered aromatic heterocycle containing 2 or more nitrogen atoms, which may further have substituent(s); B is an optionally substituted hydrocarbon group or an optionally substituted heterocyclic group; X is a divalent acyclic hydrocarbon group; Z is —O—, —S—, —NR
2
—, —CONR
2
— or —NR
2
CO— (R
2
is a hydrogen atom or an optionally substituted alkyl group); Y is a bond or a divalent acyclic hydrocarbon group; R
1
is an optionally substituted cyclic group, an optionally substituted amino group or an optionally substituted acyl group, provided that when the 5-membered aromatic heterocycle represented by ring A is imidazole, then Z should not be —O—, or a salt thereof.