Suppose that $f(x)=(x-m_1)(x-m_2)\dots (x-m_n)-1=g(x)h(x)$ for nonconstant monic polynomials $g(x), h(x)\in \mathbb{Z}[x]$. Then for all $1\leq i\leq n$ we have $g(m_i)h(m_i)=-1$.
Because $g(m_i), h(m_i)$ are integers, we have $g(m_i)=\pm 1, h(m_i)=\mp 1$ so $g(m_i)+h(m_i)=0$.
But the polynomial $p(x)=g(x)+h(x)$ has degree less than $n$ and has $n$ roots (namely $m_1, m_2\dots, m_n$) so $p(x)=0\implies g(x)=-h(x)$.
Then $f(x)=(x-m_1)(x-m_2)\dots(x-m_n)-1=-g(x)^2$. But $(x-m_1)(x-m_2)\dots(x-m_n)-1$ has leading coefficient $1$, and $-g(x)^2$ has leading coefficeint $-1$, a contradiction.
From the above we can always take $f(x)=(x-m_1)(x-m_2)\dots(x-m_n)-1$ satisfying the two conditions of the problem.