President and COO Jonathan Schwartz will take over as CEO, effective immediately, while McNealy will remain chairman and a full-time Sun employee.
The company has long been under pressure from Wall Street to cut costs and return to profitability, and traders' reaction to the news suggests that they think Schwartz will be more likely to do so than McNealy.
Sun's fiscal third quarter results, also reported after the close on Monday, showed a 21% increase in sales to $3.18 billion, but that was below $3.21 billion estimates. The company's loss of $217 million, or 6 cents a share, was in line with forecasts.
"We're growing again," McNealy said in a statement. "Products are winning awards. The Solaris 10 Operating System is a runaway success. The next step is consistent profitability."
Company officials said on a conference call that they will begin looking at areas for potential cost savings and will have more details to report in July.
Stocks traded lower Monday ahead of a key earnings report from Microsoft on Thursday and first-quarter GDP on Friday.