4. In trapezoid $A B C D$, $A B / / D C, \angle A B C=$ $90^{\circ}, E$ is the midpoint of leg $A D$. If $E C=\sqrt{13}, A B+$ $B C+C D=2 \sqrt{26}$, then $\angle B C E=(\quad)$.
(A) $30^{\circ}$
(B) $45^{\circ}$
(C) $60^{\circ}$
(D) $75^{\circ}$
4. B.

As shown in Figure 3, let $BC = x$, and take the midpoint $F$ of $BC$, connecting $EF$. Then
$$
\begin{array}{l}
EF \parallel AB, \\
\angle EFC = 90^{\circ}, \\
EF = \frac{1}{2}(AB + DC) \\
= \frac{1}{2}(2 \sqrt{26} - x).
\end{array}
$$
$$
\begin{aligned}
& \text{By } EC^{2} = EF^{2} + FC^{2} \\
\Rightarrow & 13 = \frac{1}{4}(2 \sqrt{26} - x)^{2} + \frac{1}{4} x^{2} \\
\Rightarrow & x = \sqrt{26}.
\end{aligned}
$$

Thus, $AB + DC = BC = \sqrt{26}$.
Therefore, $EF = \frac{1}{2} BC$.
Hence, $\triangle BEC$ is an isosceles right triangle. Therefore, $\angle BCE = 45^{\circ}$.