Facebook is paying Microsoft $550m (£341m) for some of the patents it recently bought from AOL.
Microsoft paid more than $1bn for most of AOL's patents, beating rivals reported to have included Facebook.
Facebook was sued by Yahoo for patent infringement earlier this year.
The social networking site, which is preparing for a stock market listing, also reported a drop in its first quarter profits to $205m from $233m a year earlier.
A Facebook lawyer described the deal as: "Another significant step in our ongoing process of building an intellectual property portfolio to protect Facebook's interests."
Microsoft bought 925 patents and patent applications from AOL. It is now selling 650 of those patents to Facebook as well as licences to the other 275.
"Today's agreement with Facebook enables us to recoup over half of our costs while achieving our goals from the AOL auction," said Microsoft's general counsel Brad Smith.
There has been a series of recent patent deals between technology companies as they try to defend themselves in lawsuits.
If a company successfully sues another it can demand a sales ban of its competitor's products, or force the loser to pay expensive licence fees.
Since the start of the year, Intel, Google and Facebook are among those to have bought significant numbers of patents from other technology companies.
Facebook bought a number of patents from IBM last month.
Also on Monday, Facebook reported results for the first three months of the year.
The company, which is expected to list on the stock market in the coming months, reported a drop in its net income between January and March to $205m from $233m in the same period last year.
Revenues for the quarter came in at $1.06bn, down 6% from the final three months of 2011.
Facebook said that its advertising business usually slows down in the first quarter but that the growth of the business in previous years had masked that trend.
Facebook also revealed that it has agreed to pay $200m to Instagram if its recent $1bn deal to buy the photo-sharing firm were to fall through.