I'm not sure how this still isn't two million dollars? I guess if you subtract the salary this person could be making if they paid him $2M up front and let him walk away?
[0] http://www.investopedia.com/terms/t/timevalueofmoney.asp
But in any case: It comes in addition to a salary if they hire him, whether or not the $2m would be paid up front or in tranches, and if they genuinely wanted the product, not to hire him, he'd expect to be able to still earn a salary. In fact, I'd argue that he'd expect to be able to increase his income potential: He'd have a Google acquisition to put on his resume.
Taxes change all that and make things more complicated ($2 million lump sum is taxed more heavily than when it is split up over 4 years). I'm not sure how that works out though.