In this paper, we deal with the following double phase problem $$\begin{aligned} \left\{ \begin{array}{lll} -\text{ div }\left( |\nabla u|^{p-2}\nabla u+a(x)|\nabla u|^{q-2}\nabla u\right) =&{} \gamma \left( \displaystyle \frac{|u|^{p-2}u}{|x|^p}+a(x)\displaystyle \frac{|u|^{q-2}u}{|x|^q}\right) \\ &{}+f(x,u) &{} \text{ in } \Omega ,\\ u=0&{} &{} \text{ in } \partial \Omega , \end{array} \right. \end{aligned}$$where \(\Omega \subset {\mathbb {R}}^N\) is an open, bounded set with Lipschitz boundary, \(0\in \Omega \), \(N\ge 2\), \(1<p<q<N\), weight \(a(\cdot )\ge 0\), \(\gamma \) is a real parameter and f is a subcritical function. By variational method, we provide the existence of a non-trivial weak solution on the Musielak-Orlicz-Sobolev space \(W^{1,{\mathcal {H}}}_0(\Omega )\), with modular function \({\mathcal {H}}(t,x)=t^p+a(x)t^q\). For this, we first introduce the Hardy inequalities for space \(W^{1,{\mathcal {H}}}_0(\Omega )\), under suitable assumptions on \(a(\cdot )\).