5. Given $x, y \in [0,+\infty)$ and satisfy $x^{3}+y^{3}+3 x y=1$.
Then the maximum value of $x^{2} y$ is $\qquad$
5. $\frac{4}{27}$.

From the given, we have
$$
\begin{array}{l}
x^{3}+3 x y+y^{3}-1 \\
=(x+y-1)\left(x^{2}+y^{2}-x y+x+y+1\right) \\
=0 . \\
\text { Also, } x^{2}+y^{2}-x y+x+y+1 \\
\geqslant x y+x+y+1>0 \\
\Rightarrow x+y=1 .
\end{array}
$$

Therefore, $x^{2} y=4 \times \frac{x}{2} \times \frac{x}{2}(1-x)$
$$
\leqslant 4\left[\frac{\frac{x}{2}+\frac{x}{2}+(1-x)}{3}\right]^{3}=\frac{4}{27} \text {. }
$$

When $x=\frac{2}{3}, y=\frac{1}{3}$, $x^{2} y$ achieves the maximum value $\frac{4}{27}$.