The deal brings together WebMD's websites, such as WebMD.com, Medscape.com and MedicineNet.com, and those owned by KKR unit Internet Brands Inc, including DentalPlans.com and AllAboutCounseling.com.
KKR will pay $66.50 per share, a premium of 20.5 percent to WebMD's Friday closing price. WebMD's shares were trading at $66 before the opening bell.
Reuters reported on Sunday that KKR was nearing a deal to buy the online health information provider.
Founded in 1996, WebMD has grown into one of the most popular health websites for consumers and medical professionals, attracting more than 70 million monthly unique visitors in 2016, according to analytics company comScore Inc.
WebMD also owns medical news and education brand Medscape, which accounted for around 60 percent of its advertising revenue in 2016.
The New York-based company said in February it would explore its options, after a slowdown in advertising paid for by pharmaceutical companies.
The deal, approved by the WebMD board, is expected to close in the fourth quarter of 2017.
J.P. Morgan Securities LLC is WebMD's financial adviser, while Shearman & Sterling LLP is its legal adviser.
Simpson Thacher & Bartlett LLP is Internet Brands' legal adviser.