4. Let the side lengths of $\triangle A B C$ be $6, x, 2x$. Then the maximum value of its area $S$ is $\qquad$ .
4. 12 .

From the given, we know that $2 x-x<6<2 x+x \Rightarrow 2<x<6$.
Let the side opposite to $\angle A$ be 6.
By the cosine rule, we have
$$
\begin{aligned}
36 & =x^{2}+4 x^{2}-4 x^{2} \cos A \\
\Rightarrow & \cos A=\frac{5}{4}-\frac{9}{x^{2}} \\
\Rightarrow & \sin ^{2} A=1-\left(\frac{5}{4}-\frac{9}{x^{2}}\right)^{2} \\
& =\left(\frac{9}{x^{2}}-\frac{1}{4}\right)\left(\frac{9}{4}-\frac{9}{x^{2}}\right) .
\end{aligned}
$$

Then $S^{2}=\left(\frac{1}{2} \cdot x \cdot 2 x \cdot \sin A\right)^{2}$
$$
\begin{array}{l}
=x^{4}\left(\frac{9}{x^{2}}-\frac{1}{4}\right)\left(\frac{9}{4}-\frac{9}{x^{2}}\right) \\
=9\left(9-\frac{x^{2}}{4}\right)\left(\frac{x^{2}}{4}-1\right)
\end{array}
$$
$$
\begin{array}{l}
\leqslant 9\left(\frac{9-\frac{x^{2}}{4}+\frac{x^{2}}{4}-1}{2}\right)^{2}=144 \\
\Rightarrow S \leqslant 12 .
\end{array}
$$

When $x=2 \sqrt{5} \in(2,6)$, the equality holds.
Thus, $S_{\max }=12$.