The company did not give a reason for his abrupt departure in the regulatory filing and a Yahoo spokeswoman declined to comment.
But the troubled Internet company has had disappointing advertising results and has been unable to kick-start revenue growth on his watch. And the former Google executive had reportedly been on the outs with Yahoo Chief Executive Marissa Mayer.
De Castro was Mayer's first major hire at Yahoo. She recruited him away from Google in October 2012 with a pay package estimated as high as $61.6 million including as much as $20 million in restricted stock units.
He had worked at Google since 2006 and was the company's vice president of partner business solutions worldwide. He will receive severance benefits and equity awards according to his contract, Yahoo said.
Mayer has been leading the charge to reinvent Yahoo and compete against Google and Facebook for advertising dollars and users' eyeballs. But, even as the digital advertising market boomed, Yahoo had trouble catching up to rivals, and de Castro was under pressure to show results.Yahoo's third-quarter earnings beat estimates, but revenue remained essentially flat, with a decline in display advertising revenue.