5. In $\triangle A B C$, it is known that $A B=13, B C=12$, $C A=5$, $D$ is the midpoint of side $A B$, $D E \perp A B$ and intersects the angle bisector of $\angle A C B$ at point $E$. Then the length of $D E$ is ( ).
(A) $\frac{60}{13}$
(B) $\frac{11}{2}$
(C) 6
(D) $\frac{13}{2}$
5. D.

As shown in Figure 6, connect $C D$. It is easy to know that $\angle A C B=90^{\circ}$.

Since $C E$ bisects $\angle A C B$, we get $\angle E C B=45^{\circ}$.
Thus, $\alpha=45^{\circ}+\angle B$.
And since $C D=B D$, we have
$$
\begin{array}{l}
\angle E C D \\
=45^{\circ}-\angle B .
\end{array}
$$

Since $D E \perp A B$, we have
$$
\begin{array}{l}
\angle E=90^{\circ}-\alpha \\
=45^{\circ}-\angle B=\angle E C D .
\end{array}
$$

Therefore, $D E=C D=\frac{1}{2} A B=\frac{13}{2}$.