But he will receive millions in severance payments

A memo obtained by a technology blog reportedly indicated that de Castro had been fired by Yahoo CEO Marissa Mayer. “I made the difficult decision that our COO … should leave the company,” she wrote. Mayer had persuaded de Castro to leave Google (GOOG) to join Yahoo in 2012, Reuters notes.

Sliding ad revenue may have ended de Castro’s tenure at the struggling Internet pioneer. During each of the first three quarters of 2013, revenue at Yahoo slipped by as much as 7%

Yahoo did not disclose the reason that de Castro was departing. Mayer had recruited de Castro based on his experience with online advertising at Google. His termination hints that Mayer thinks that Yahoo needs immediate and strong action to improve its Internet advertising business.

While de Castro won’t continue as COO at Yahoo, he will have a substantial severance package to console himself. According to USA TODAY, de Castro’s compensation package features $20 million in restricted YHOO stock units and other equity benefits totaling $36 million. Some of those YHOO stock units will vest immediately on termination, while others vest over four years.