Companies like DoubleClick and aQuantive help provide the delivery of "display" ads on websites such as banners and boxes, which lead users to advertiser's websites.
Google is already the leading provider of keyword search advertising, which suggests sponsored links along with search results.
Microsoft lags far behind Google and Yahoo in online advertising due to the lower traffic on its own destination website, MSN, and does not want to get left behind in the industry's rapid expansion.
Online marketing is expected to grow nearly 30 per cent this year, way ahead of other forms of advertising.
Denise Garcia, an industry analyst with AG Edwards said the deal "certainly keeps them in the competitive arena with Google".
Acquiring aQuantive's technology will allow Microsoft to deliver ads to third-party websites.
This should mesh with Microsoft's existing plans for delivering ads onto other platforms such as video games on its XBox, which connects to the internet.
Kevin Johnson, the head of Microsoft's platforms and services division, which includes the Windows operating system and online services such as MSN, said there was a "competitive process" to acquire aQuantive, but he declined to talk about other bidders.
Aaron Kessler, an analsyt at Piper Jaffray, estimates the online advertising market to be worth about $25bn this year and expects annual growth of about 17 per cent over the next five years.
Johnson said Microsoft was "committed to earning a bigger slice of that market opportunity" with the acquisition, but some analysts expressed surprise at the price.
John McPeake, a Prudential Securities analyst, said in a note to investors that the deal "looks expensive" and that it was not clear why Microsoft would want to have a business that sent traffic to competitors, such as Yahoo and Google.
He said: "It just doesn't feel like it is in their DNA." However, Sid Parakh, an analyst with McAdams Wright Ragen, described it as a good fit.
Parakh said: "They needed to buy a company like aQuantive, that was not a question," Parakh said. "Did they overpay for it? Only time will tell."