Shares of LinkedIn surged 48 percent after the announcement, while shares of Microsoft were down 3 percent. Before the announcement, trading in Microsoft had been halted briefly for news pending.
Jeff Weiner will stay on as CEO of LinkedIn and will report to Microsoft CEO Satya Nadella. The deal was unanimously approved by both companies' Boards of Directors, and is expected to close by the end of the calendar year. The acquisition is still subject to approval by LinkedIn shareholders, and regulatory approvals.
"The LinkedIn team has grown a fantastic business centered on connecting the world's professionals," Nadella said in a statement. "Together we can accelerate the growth of LinkedIn, as well as Microsoft Office 365 and Dynamics as we seek to empower every person and organization on the planet."
In a statement to LinkedIn employees, Weiner said "little is expected to change", and employees will have the same titles and managers.
"The one exception: For those members of the team whose jobs are entirely focused on maintaining LinkedIn's status as a publicly traded company, we'll be helping you find your next play," Weiner said. "In terms of everything else, it should be business as usual. We have the same mission and vision; we have the same culture and values; and I'm still the CEO of LinkedIn."
"This is a great deal," Ivan Feinseth, CIO at investment firm Tigress Financial Partners, told CNBC's " Squawk Box ." He said his company publishes research on Microsoft.
"LinkedIn is the ultimate business social platform. You have everybody on this from interns and college student on up to the biggest CEOs," Feinseth said. "This is a good way for Microsoft to expand in social platforms."
There was speculation in the market for a while that Microsoft might buy Salesforce.com as a cloud play. Feinseth said an eventual Salesforce.com deal could still happen down the road. "Microsoft has the resources ... the cash ... the balance sheet ... and the borrowing ability to acquire a lot more."
Correction: This story was updated to revise a headline that gave an incorrect amount for the value of the deal.
Programming note: Nadella and Weiner will appear on CNBC at 11 am EDT.