US telecoms giant Verizon is selling its media assets, which include the two companies, to a US private equity firm in a deal worth $5bn (£3.6bn).
Verizon bought Yahoo in 2017 and AOL in 2015 for a combined $9bn.
Yahoo and AOL were once trailblazers, but were subsequently overshadowed by firms like Google and Facebook.
Under the sale of the media assets to Apollo Global Management, Verizon will retain a 10% stake in the division.