2. Given that the sum of two different positive integers is 2012. Then the maximum value of their least common multiple $M$ is ( ).
(A) $1006^{2}$
(B) $1005 \times 1006$
(C) 1006
(D) $1005 \times 1007$
2. D.

Let two positive integers be $x, y(x>y)$, and
$$
(x, y)=d, x=d x_{0}, y=d y_{0}.
$$

Then $\left(x_{0}, y_{0}\right)=1$.
From the problem, we know $d\left(x_{0}+y_{0}\right)=2012$.
Then $M=d x_{0} y_{0}=\frac{2012 x_{0} y_{0}}{x_{0}+y_{0}}$.
From $\left(x_{0}+y_{0}\right) \times x_{0} y_{0}$, we know $\left(x_{0}+y_{0}\right) \mid 2012$.
Thus, $x_{0}+y_{0}=2,4,503,1006,2012$.
$$
\text { (1) } x_{0}+y_{0}=2 \Rightarrow x_{0}=y_{0}=1 \Rightarrow x=y,
$$

which is a contradiction.
$$
\text { (2) } x_{0}+y_{0}=4 \Rightarrow\left(x_{0}, y_{0}\right)=(3,1),
$$

In this case, $M=1509$.
$$
\begin{array}{l}
\text { (3) } x_{0}+y_{0}=503 \\
\Rightarrow M=4 x_{0} y_{0} \leqslant 4 \times 251 \times 253. \\
\text { (4) } x_{0}+y_{0}=1006 \\
\Rightarrow M=2 x_{0} y_{0} \leqslant 2 \times 501 \times 505. \\
\text { (5) } x_{0}+y_{0}=2012 \\
\Rightarrow M=x_{0} y_{0} \leqslant 1005 \times 1007.
\end{array}
$$

In summary, the maximum value of $M$ is $1005 \times 1007$.