Details of the deal were not shared, but in a joint statement the firms said they would "collaborate on certain patent matters".
It is the latest move by technology firms to keep patent rows out of the courts.
The battles, particularly over software, intensified in recent years as firms sought to capitalise on their patent portfolios.
But of late there has been a shift towards licensing rather than litigation.
Tangled web of disputes
In a brief, joint statement, the companies said: "Microsoft and Google are pleased to announce an agreement on patent issues.
"As part of the agreement, the companies will dismiss all pending patent infringement litigation between them, including cases related to Motorola Mobility.
"Separately, Google and Microsoft have agreed to collaborate on certain patent matters and anticipate working together in other areas in the future to benefit our customers."
The two firms had been involved in a tangled web of disputes, some spurred by Google`s acquisition of Motorola Mobility in 2011, which meant the search giant took on board a large number of patents relating to mobile phone and network technology.
Google bought Motorola`s mobile arm for $12.5bn (£8.3bn) in 2011, only to sell it in 2014 for $2.91bn to Lenovo. Google retained the bulk of the patents it took on in the original deal.