4. In square $A B C D$, $N$ is the midpoint of $D C$, $M$ is a point on $A D$ different from $D$, and $\angle N M B=\angle M B C$. Then $\operatorname{tg} \angle A B M=$ $\qquad$
4. $-\frac{1}{3}$.

Extend $M N$ to intersect the extension of $B C$ at $T$, let the midpoint of $M B$ be $O$, connect $T O$, then $\triangle B A M \sim \triangle T O B$.
So, $\frac{A M}{M B}=\frac{O B}{B T}$, which means $M B^{2}=2 A M \cdot B T$.
Let $D N=1, C T=M D=k$, then $A M=2-k$. $B M=\sqrt{4+(2-k)^{2}}, B T=2+k$ substitute into (1), we get $4+(2-k)^{2}=2(2-k)(2+k)$.
$$
\therefore \operatorname{tg} \angle A B M=\frac{A M}{A B}=\frac{1}{3} .
$$