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.
At least 158 people have died in Spain's worst flooding disaster in generations. On October…
Google has been fined two undecillion (a two followed by 36 zeroes) roubles by a…
Embarking on a home remodel is an exciting journey, promising enhanced comfort, increased property value,…
The US presidential candidates continued to campaign across key swing states on October 20. Footage…
Elon Musk has said he will give away $1 million a day to a registered…
India and Canada have decided to expel their top envoys along with other diplomats as…