Google will pay $40.00 per share, a 63 percent premium to Motorola's closing price on Friday.
Motorola Mobility was separated from the rest of Motorola in January. The company has remade itself as a maker of smartphones based on Google's Android software, but has struggled against Apple Inc. and Asian smartphone makers.
"Motorola Mobility's total commitment to Android has created a natural fit for our two companies," said Google CEO Larry Page in a statement. "Together, we will create amazing user experiences that supercharge the entire Android ecosystem for the benefit of consumers, partners and developers."
The acquisition has the approval of both companies' boards and is expected to close by the end of this year or early 2012. It dwarfs Google's previous biggest deal, the 2008 purchase of DoubleClick for $3.2 billion.
In premarket trading, shares of Motorola Mobility soared 60 percent, or $14.72, to $39.19. Shares of Google, meanwhile, fell $14.68, or 2.6 percent, to $549.95.