A set $X$ in the Euclidean space $mathbb{R}^d$ is called an $m$-distance set if the set of Euclidean distances between two distinct points in $X$ has size $m$. An $m$-distance set $X$ in $mathbb{R}^d$ is said to be maximal if there does not exist a vector $x$ in $mathbb{R}^d$ such that the union of $X$ and ${x}$ still has only $m$ distances. Bannai--Sato--Shigezumi (2012) investigated the maximal $m$-distance sets which contain the Euclidean representation of the Johnson graph $J(n,m)$. In this paper, we consider the same problem for the Hamming graph $H(n,m)$. The Euclidean representation of $H(n,m)$ is an $m$-distance set in $mathbb{R}^{m(n-1)}$. We prove that the maximum $n$ is $m^2 + m - 1$ such that the representation of $H(n,m)$ is not maximal as an $m$-distance set. Moreover we classify the largest $m$-distance sets which contain the representation of $H(n,m)$ for $mleq 4$ and any $n$. We also classify the maximal $2$-distance sets in $mathbb{R}^{2n-1}$ which contain the representation of $H(n,2)$ for any $n$.