Given a group $G$ and $G$-modules $M,N$ with $M$ $\mathbb{Z}$-free then it's well known that
$$Ext_{\mathbb{Z}G}^i(M,N) \cong H^i(G,Hom(M,N))$$
for all $i \ge 0$ (a reference is Brown, Cohomology of Groups, Proposition 2.2).

But what happens if $M$ is not $\mathbb{Z}$-free ? Is it still possible to express $Ext_{\mathbb{Z}G}^i(M,N)$ by cohomology groups of $G$ (maybe in form of a spectral sequence) ?

Remark: The statement remains true if we replace $\mathbb{Z}$ by an hereditary commutative ring $R$, $\mathbb{Z}G$ by an augmented $R$-projective $R$-algebra $A$ and $H^\ast(G,-)$ by $Ext_A^\ast(R,-)$.

As you've probalby noticed, we can't just take group cohoology. If $G$ is trivial, we are just taking exts in the category of abelian groups, which are nontrivial, but the group cohomology is trivial.

The spectral sequence idea is completely correct. The functor $Hom_{\mathbb ZG}(M,-)$ is the composition of the functor $Hom_{\mathbb Z}(M,-)$ with the functor $H^0(G,-)$. Here we need to see $Hom$ as a $G$-module. $G$ acts by taking $f$ to $g^{-1} \circ f \circ g$.

Now we use the spectral sequence for a composition of derived functors. $Hom_{\mathbb Z}$ preserves projectives so that makes sense.

So we get a spectral sequence sending $H^i(G, Ext^j_\mathbb Z (M,N))$ to $Ext^i_{\mathbb ZG}(M,N)$.