The statement is clear in the case $n=2$. In the case $n=3$ the statement is a consequence of the Loop Theorem and, I think, is due to Waldhausen's 1968 paper "On irreducible 3 -manifolds which are sufficiently large." You can find some form of it in Hempel's book "3-manifolds" (Lemma 6.6) and, in a cleaner form, in Hatcher's "Notes on basic 3-manifold topology," Lemma 3.6. Note that one does not need $M$ to be closed in this case. I do not know what happens in dimension 4, I suspect the statement is false. In dimensions $n\ge 5$ it is true and the proof is somewhat similar to the 3-dimensional case. Instead of the Loop Theorem one uses transversality:
First of all, since $M$ is compact, the kernel of $\pi_1(N,x)\to \pi_1(M,x)$ is the normal closure of a finite subset of $\pi_1(N,x)$ for each $x\in N$ (note that $N$ can be disconnected). The submanifold $N$ is 2-sided, let $\nu(N)=[-1,1]\times N$ denote its tubular neighborhood in $M$. If each component of $\partial \nu( N)$ is $\pi_1$-injective in $M_0:=M-int(\nu(N))$, then (by the Seifert-Van Kampen theorem)
$N$ is $\pi_1$-injective in $M$ and there is nothing to prove. Again, by compactness, we obtain a finite collection of simple loops
$c_i$ in $\partial M_0$ ($i=1,...,k$) which normally generate kernels of the homomorphisms $\pi_1(\partial M_0,x)\to \pi_1(M)$.
Without loss of generality, we may assume that the loops $c_i$ are pairwise disjoint. We will modify $N$ by killing off the loops $c_i$.
Then, by transversality, each $c_i$ bounds smooth embedded 2-disk $D_i$ in $M_0$ such that $D_i\cap \partial N_0=c_i$ and the disks are pairwise disjoint. Next, attach pairwise disjoint 2-handles $H_i$ in $M_0$ to $\nu(N)$ (and smooth the corners!) so that $D_i$ is the core of $H_i$. The boundary of $W=\nu(N)\cup (H_1\cup...\cup H_k)$ consists of two parts: One of these is $N$ and the other is a submanifold $N'$ homologous to $N$. By the construction, $N'$ is $\pi_1$-injective in $M$.
This argument breaks down in dimension $4$ since we cannot guarantee the existence of embedded and pairwise disjoint disks $D_i$.
Edit. There is a problem with my proof in dimension $\ge 5$ since the image subgroup of $\pi_1(M)$ need not be finitely presentable.