In a note to Zynga employees, Mattrick said he is "excited" to join the company.
Pincus, 47, who controls a 61 percent voting stake in the gaming company he founded in 2007, will remain chairman.
Zynga's business model, which relied heavily on selling virtual goods to gamers on Facebook's platform, began to disintegrate a year ago as users tired of Facebook games. Pincus has been unable to turn around the company named after his pet bulldog, Zinga.
The company's shares have hovered at just 25 percent of its $10 price at the company's initial offering price in December 2011.
Mattrick joined Microsoft in 2007 after spending years at Electronic Arts. He helped turn the Xbox business into a profitable venture after years of losses, eventually propelling it into the No.1 selling console in the United States.