First note that $a$ divides $b-c$ iff it divides $c-b$, so that the absolute value sign in the condition $n!$ divides $|x-y|$ may be dropped and the condition can be written as $n!|x-y$ (where this single $|$ is the symbol for "divides").
Now for each pair of distinct integers $x,y$ let $n_{xy}$ denote the largest $n$ such that $n!|x-y.$ Then $d(x,y)=1/n_{xy}!.$ Since $d$ is nonnegative and $d(x,x)=0$ the triangle inequality is clear if any two of $x,y,z$ are equal, so we assume they are distinct.
To look at $d(x,y)+d(y,z)$ we note that if $w=\min(n_{xy},n_{yz})$ then $w!$ divides $x-z=(x-y)+(y-z).$ It may happen that a larger factorial than $w!$ divides $x-z$, but we do have $w \le n_{xz}$ in any case. So we have
$$d(x,z)=1/n_{xz}! \le 1/w! \le 1/n_{xy}!+1/n_{yz}!=d(x,y)+d(y,z).$$
(In the second inequality, since $w$ is the smaller of the two of $n_{xy},n_{y,z}$ its reciprocal factorial is the reciprocal factorial of one of them, so is less than their sum.) This actually shows the slightly stronger inequality $d(x,z) \le \min [d(x,y),d(y,z)],$ reminiscent of a $p$ adic norm.