The loss came after it wrote down the value of Aquantive by $6.2 billion (5 billion Euros), which failed to bring the profits expected by Microsoft.
That led to a $492 million loss in the three months to the end of June, compared with a profit of $5.9 billion a year ago.
The computing giant company has not made a loss since it joined the stock market in 1986.
It took over Aquantive in 2007 but it struggled to compete with rival Google.
Microsoft paid $6.3 billion for Aquantive.
Microsoft is doing well in other areas, despite the decline in popularity of its Windows operating system, which dominated the personal computer market for years.
Revenue for the three months to June rose by 4% to $18.06 billion.
Excluding the adjustment for the asset write-down, and the holding back of some income related to the launch of its Windows 8 system, Microsoft profits beat those expected by investors.
Shares were up 1.6% after the results were announced.
Microsoft says the update of the Windows systems is the most important redesign in more than 10 years.
Windows 8, which will launch in October, will feature a new look that will present applications in a mosaic of tiles.
Importantly, it will also enable the operating system to work on tablet computers, which along with smartphones are the fastest-growing sector of the computing market.
Microsoft is also planning to release its own tablet, the Surface.
Earlier this week, Microsoft previewed its next version of the Office system, which is expected to be released next year.
Image source: Wikimedia Commons President-elect Donald Trump celebrated his election victory at the Ultimate Fighting…
Millions of voters across the US chose to return Donald Trump to the White House…
Donald Trump declares victory in the US election as he addresses jubilant supporters in Florida.…
Stocks around the world are rising as Donald Trump appears to be on the cusp…
Donald Trump has won Pennsylvania, North Carolina and Georgia and taken a lead over Kamala…
Quincy Jones, the celebrated musician and producer who worked with Michael Jackson, Frank Sinatra, Ray…