AOL's stock was up more than 17 percent after the announcement. Verizon's stock was down slightly.
AOL co-founder Steve Case tweeted his approval.
The transaction will be completed this summer and will take the form of a tender offer followed by a merger, after which AOL will become a wholly owned subsidiary of Verizon, the announcement said.
Read MoreTimeline: AOL through the years
"Verizon's vision is to provide customers with a premium digital experience based on a global multiscreen network platform. This acquisition supports our strategy to provide a cross-screen connection for consumers, creators and advertisers to deliver that premium customer experience," said Lowell McAdam, Verizon's chief executive.
Tim Armstrong, AOL's chairman and CEO, will remain at his position once the deal is finalized.
"Verizon is a leader in mobile and OTT (over-the-top video) connected platforms, and the combination of Verizon and AOL creates a unique and scaled mobile and OTT media platform for creators, consumers and advertisers," Armstrong said in the announcement.
He also said executing this deal was the next step for the company to continue growing.
"If you look at AOL over the last five years ... we turned the company around. We outperformed the S&P 500 for the last five years, and when you look at where we are today and where we're going, we've made AOL as big as it can possibly be in today's landscape," he said in a CNBC "Squawk Box" interview. "But if you look forward five years, you're going to be in a space where there are going to be massive, global-scale networks, and there's no better partner for us to go forward with than Verizon."
"It's really not about selling the company today. It's about setting up for the next five to 10 years, and we've spoken for years about this," he added.
Earlier this year, Armstrong dismissed rumors of a merger with either Verizon or tech giant Yahoo. "There's always speculation around us because we have taken a company that was not doing well and ended 2014 with two straight years of growth," he told CNBC on Jan. 7. "We have a lot of partners coming in to talk to us, but AOL has a unique vision, a unique strategy and we've stayed on strategy."
On Friday, AOL reported first-quarter earnings of 34 cents per share, 2 cents above estimates. Verizon also topped analysts' expectations after reporting first-quarter profits of $1.02 per share on April 21.
David Bank, managing director at RBC Capital Markets, told CNBC's " Squawk Box" he believes the merger makes sense for Verizon because it expands the company's digital advertising reach.
"This is less about content than about a lot of these mature media platforms needing … new ad tech," Bank said. "Our sense of the industry is, when you look at these partnerships, what's driving them is not so much the content as having a platform for programmatic [advertising]."
Nevertheless, Craig Moffett of Moffett Nathanson Research told CNBC's "Squawk Box" the deal might not move the needle for Verizon. "AOL, when this deal is finished, is going to be something like 1 percent of the enterprise value of Verizon, so it's a small transaction," he said.
—CNBC's Tom DiChristopher contributed to this report.