5. $x_{1}, x_{2}$ are the two real roots of the equation $x^{2}-2 m x+\left(m^{2}+2 m+3\right)=0$. Then the minimum value of $x_{1}^{2}+x_{2}^{2}$ is
$5.4 \frac{1}{2}$.
If the equation has real roots, then
$$
\Delta=4 m^{2}-4\left(m^{2}+2 m+3\right)=-8 m-12 \geqslant 0 \text {. }
$$

Thus, $m \leqslant-\frac{3}{2}$.
Also, from $x_{1}+x_{2}=2 m, x_{1} x_{2}=m^{2}+2 m+3$, we get $x_{1}^{2}+x_{2}^{2}=\left(x_{1}+x_{2}\right)^{2}-2 x_{1} x_{2}=2\left[(m-1)^{2}-4\right]$.
Since $m \leqslant-\frac{3}{2}$, when $m=-\frac{3}{2}$, the minimum value of $x_{1}^{2}+x_{2}^{2}$ is $2\left[\left(-\frac{3}{2}-1\right)^{2}-4\right]=2 \times \frac{9}{4}=4 \frac{1}{2}$.