5. Let $x$ and $y$ be real numbers. Then the algebraic expression
$$
2 x^{2}+4 x y+5 y^{2}-4 x+2 y-5
$$

has the minimum value of ( ).
(A) -8
(B) 8
(C) 0
(D) -10
5. D.

Notice that,
$$
\text { the original expression }=(x+2 y)^{2}+(x-2)^{2}+(y+1)^{2}-10 \text {. }
$$

Therefore, when $x=2, y=-1$, the minimum value of the given algebraic expression is -10.