A former Microsoft manager Brian Jorgenson, and his friend Sean Stokke, have been charged for insider trading by the US securities regulator.
The Securities and Exchange Commission alleged that Mr Jorgenson tipped off Mr Stokke about the firm's announcements before they were public knowledge.
Mr Stokke used this information to trade shares and two shared the profits from such trades, the regulator said.
It said they made $393,125 (£240,000) in profits over an 18-month period.
"For every stock market winner, there is a loser, and trading on confidential inside information is a cheater's way of gaining at the expense of others," Jenny Durkan, a US attorney, said in a statement.
The commission said the two traded shares based on insider information between April 2012 and October this year.
It said the first trade was carried out ahead of Microsoft's announcement in April 2012 that it would invest $300m in Barnes & Nobel's e-reader and digital media business.
The regulator said the pair purchased Barnes & Noble call options ahead of the announcement, "which they sold for almost $185,000 in illicit profits".
In July this year, they traded in advance of Microsoft's fourth-quarter earnings.
"They knew that Microsoft's earnings were going to fall well short of analysts' consensus estimates and bought Microsoft options," the regulator said, adding that they made profits of over $195,000 when they sold the options.
They also traded ahead of the Microsoft's first-quarter earnings in October this year, which the commission said they knew "would exceed analysts' consensus estimates".
"This time, in an effort to conceal their fraud, instead of trading directly in Microsoft options, they traded in options of the Technology Select Sector SPDR Fund, which held Microsoft common stock," it alleged.
They made almost $13,000 in profits from the trade.
Microsoft said it had "zero tolerance for insider trading. We helped the government with its investigation and terminated the employee".
BBC