We calculate the additional force due to two-axion exchange acting in a sphere-disc geometry, used in experiments on measuring the gradient of the Casimir force. With this result, stronger constraints on the pseudoscalar coupling constants of an axion and axion-like particles to a proton and a neutron are obtained over the wide range of axion masses from 3 × 10 −5 to 1 eV. Among the three experiments with Au-Au, Au-Ni and Ni-Ni boundary surfaces performed by means of dynamic atomic force microscope, major improving is achieved for the experiment with Au-Au test bodies. Here, the constraints obtained are stronger up to a factor of 170, as compared to the previously known ones. The largest strengthening holds for the axion mass 0.3 eV.