  In this paper we determine all singular endomorphisms of the Hamming graph
and other related graphs. The Hamming graph has vertices $\mathbb{Z}^{m}_n$
where two vertices are adjacent, if their Hamming distance is $1$. We show that
its singular endomorphisms are uniform (each kernel has the same size) and that
they are induced by Latin hypercubes (which essentially determines the number
of singular endomorphisms). However, we do the same for its complement and some
related graphs where the Hamming distance is allowed to be one of $1,...,k$,
for some $1\leq k\leq m-1$. Ultimately, we consider the same situation where
the vertices are tuples in $\mathbb{Z}_{n_1}\times\mathbb{Z}_{n_2}\times\cdots
\times\mathbb{Z}_{n_m}$ (not all $n_i$ are equal).
