9. (16 points) Let $a, b, c > 0$, and $a+b+c=3$. Find the maximum value of $a^{2} b+b^{2} c+c^{2} a+a b c$.


Let's assume $a \leqslant b \leqslant c$ or $c \leqslant b \leqslant a$.
Then $c(b-a)(b-c) \leqslant 0$
$$
\begin{aligned}
\Rightarrow & b^{2} c+c^{2} a \leqslant a b c+c^{2} b \\
\Rightarrow & a^{2} b+b^{2} c+c^{2} a+a b c \\
& \leqslant a^{2} b+c^{2} b+2 a b c \\
& =b(a+c)^{2}=b(3-b)^{2} \\
& \leqslant \frac{1}{2}\left(\frac{2 b+3-b+3-b}{3}\right)^{3}=4 .
\end{aligned}
$$

Equality holds if and only if $a=b=c=1$ or $\{a, b, c\}=\{0, 1, 2\}$.
Thus, the maximum value of $a^{2} b+b^{2} c+c^{2} a+a b c$ is 4.