The deal is expected to close in the fourth quarter — around September — the same fiscal three-month reporting period when the new iPhone is expected to be unveiled, according to earlier reporting.
The Beats purchase comes after a leak of the news earlier this month. The final price is significantly less than the $3.2 billion that was originally published by the London's Financial Times earlier this month.
Beats will remain a separate brand from Apple's, and the company will offer both Beats' streaming music and headphones, along with its own branded headphones.
Apple's chief executive Tim Cook said in prepared remarks: "Music is such an important part of all of our lives and holds a special place within our hearts at Apple."
"The addition of Beats will make our music lineup even better, from free streaming with iTunes Radio to a world-class subscription service in Beats, and of course buying music from the iTunes Store as customers have loved to do for years," according to Apple's online software and services chief Eddie Cue.
In Apple's fiscal second quarter in April, Apple's iTunes (Software & Services) division generated $4.57 billion in revenue — up from $4.1 billion in the same period a year earlier, up by Wall Street expectations. It comes as the iPhone and iPad maker is increasingly pushing its services to the cloud in order to generate long-standing revenue from apps, music, and games.
Correction at 9:35pm ET: Apple's Q2 revenue for iTunes was $4.57 billion, not $3.57 billion.