4. In square $A B C D$, $M$ is the midpoint of side $B C$. If $\overrightarrow{A C}=\lambda \overrightarrow{A M}+\mu \overrightarrow{B D}$, then $\lambda+\mu=(\quad)$.
(A) $\frac{4}{3}$
(B) $\frac{5}{3}$
(C) $\frac{15}{8}$
(D) 2
4. B.

Notice,
$$
\begin{array}{l}
\overrightarrow{A C}=\lambda \overrightarrow{A M}+\mu \overrightarrow{B D} \\
=\lambda(\overrightarrow{A B}+\overrightarrow{B M})+\mu(\overrightarrow{B A}+\overrightarrow{A D}) \\
=\lambda\left(\overrightarrow{A B}+\frac{1}{2} \overrightarrow{A D}\right)+\mu(-\overrightarrow{A B}+\overrightarrow{A D}) \\
=(\lambda-\mu) \overrightarrow{A B}+\left(\frac{1}{2} \lambda+\mu\right) \overrightarrow{A D}
\end{array}
$$

Also, $\overrightarrow{A C}=\overrightarrow{A B}+\overrightarrow{A D}$, then
$$
\left\{\begin{array} { l } 
{ \lambda - \mu = 1 , } \\
{ \frac { 1 } { 2 } \lambda + \mu = 1 }
\end{array} \Rightarrow \left\{\begin{array}{l}
\lambda=\frac{4}{3}, \\
\mu=\frac{1}{3} \text {. }
\end{array}\right.\right.
$$

Therefore, $\lambda+\mu=\frac{5}{3}$.