We report on a search for dark matter axion-like particles (ALPs) using a Ramsey-type apparatus for cold neutrons. A hypothetical ALP-gluon-coupling would manifest in a neutron electric dipole moment signal oscillating in time. Twenty-four hours of data have been analyzed in a frequency range from 23 I^¼Hz to 1 kHz, and no significant oscillating signal has been found. The usage of present dark-matter models allows to constrain the coupling of ALPs to gluons in the mass range from 10−19 to 4×10−12 eV. The best limit of CG/fama=2.7×1013 GeV−2 (95\% C.L.) is reached in the mass range from 2×10−17 to 2×10−14 eV.