4. As shown in Figure $2, D, E$ are points on the sides $BC, AD$ of the equilateral $\triangle ABC$ respectively, $\angle BEC$ $=90^{\circ}, \angle CED=30^{\circ}$. Then the value of $BD: CD$ is ( ).
(A) $2: 1$
(B) 3: 1
(C) $5: 2$
(D) $20: 9$
4. A.

As shown in Figure 7, extend $E D$ to point $F$ such that $E F = B E$, and connect $B F$ and $C F$.

It is easy to see that $\triangle B E F$ is an equilateral triangle.
$$
\begin{array}{c}
\Rightarrow \angle B F E = 60^{\circ} \\
= \angle A C B \\
\Rightarrow A, B, F, C \text{ are four }
\end{array}
$$

points concyclic
$$
\Rightarrow \angle A F C = \angle A B C = 60^{\circ}.
$$

Therefore, $\angle E C F = 90^{\circ}$.
Then $B E \parallel C F$, and $C F = \frac{1}{2} E F = \frac{1}{2} B E$. Thus, $\frac{B D}{C D} = \frac{B E}{C F} = 2$.