10. If $0 \leqslant x_{i} \leqslant 1(i=1,2, \cdots, 5)$, then
$$
M=x_{1}-x_{2}^{3}+x_{2}-x_{3}^{3}+x_{3}-x_{4}^{3}+x_{4}-x_{5}^{3}+x_{5}-x_{1}^{3}
$$

the maximum value is $\qquad$
10.4.

If there exists a positive integer $j$, such that
$$
x_{j}=x_{j+1}\left(j=1,2, \cdots, 5, x_{6}=x_{1}\right) \text {, }
$$

then $M \leqslant 4$.
When $x_{1}=0, x_{2}=1, x_{3}=0, x_{4}=1, x_{5}=0$, the equality holds.

If for any positive integer $i$, we have $x_{i} \neq x_{i+1}$ $(i=1,2, \cdots 5)$, then either $x_{i-1}x_{i+1}$, or $x_{i-1}>x_{i}$ and $x_{i}<x_{i+1}$.
For both cases, we have
$$
\left|x_{i-1}-x_{i}\right|^{3}+\left|x_{i}-x_{i+1}\right|^{3}<\left|x_{i-1}-x_{i+1}\right|^{3} \leqslant 1 \text {. }
$$

Thus, $M<1+3=4$.
In summary, the maximum value of $M$ is 4.