13. Let $m$ be a real number not less than -1, such that the equation $x^{2}+2(m-2) x+m^{2}-3 m+3=0$ has two distinct real roots $x_{1}$ and $x_{2}$.
(1) If $x_{1}^{2}+x_{2}^{2}=6$. Find the value of $m$;
(2) Find the maximum value of $\frac{m x_{1}^{2}}{1-x_{1}}+\frac{m x_{2}^{2}}{1-x_{2}}$.
$$
\begin{aligned}
\Delta & =4(m-2)^{2}-4\left(m^{2}-3 m+3\right) \\
& =-4 m+4>0 .
\end{aligned}
$$

Then $m<1$.
Combining the given conditions, we have $-1 \leqslant m<1$.
$$
\begin{array}{l}
\text { (1) } \because x_{1}^{2}+x_{2}^{2}=\left(x_{1}+x_{2}\right)^{2}-2 x_{1} x_{2} \\
=4(m-2)^{2}-2\left(m^{2}-3 m+3\right) \\
=2 m^{2}-10 m+10, \\
\therefore 2 m^{2}-10 m+10=6, \\
\end{array}
$$

Thus, $m^{2}-5 m+2=0$. Solving this, we get $m=\frac{5 \pm \sqrt{17}}{2}$.
Since $-1 \leqslant m<1$, we have $m=\frac{5-\sqrt{17}}{2}$.
$$
\begin{array}{l}
\text { (2) } \frac{m x_{1}^{2}}{1-x_{1}}+\frac{m x_{2}^{2}}{1-x_{2}} \\
=\frac{m\left[x_{1}^{2}\left(1-x_{2}\right)+x_{2}^{2}\left(1-x_{1}\right)\right]}{\left(1-x_{1}\right)\left(1-x_{2}\right)} \\
=\frac{m\left[x_{1}^{2}+x_{2}^{2}-x_{1} x_{2}\left(x_{1}+x_{2}\right)\right]}{x_{1} x_{2}-x_{1}-x_{2}+1} \\
=\frac{m\left[\left(2 m^{2}-10 m+10\right)+\left(m^{2}-3 m+3\right)(2 m-4)\right]}{\left(m^{2}-3 m+3\right)+(2 m-4)+1} \\
=\frac{m\left(2 m^{3}-8 m^{2}+8 m-2\right)}{m^{2}-m} \\
=\frac{2 m(m-1)\left(m^{2}-3 m+1\right)}{m(m-1)} \\
=2\left(m^{2}-3 m+1\right). \\
\end{array}
$$

Let $y=2\left(m^{2}-3 m+1\right)=2\left(m-\frac{3}{2}\right)^{2}-\frac{5}{2}$, $-1 \leqslant m<1$. Since $y$ is decreasing on $-1 \leqslant m<1$, the maximum value of $y$ is 10 when $m=-1$.
Therefore, the maximum value of $\frac{m x_{1}^{2}}{1-x_{1}}+\frac{m x_{2}^{2}}{1-x_{2}}$ is 10.