Valeant Pharmaceuticals International Inc. said Thursday that it will pay $1 billion for Sprout Pharmaceuticals Inc., the closely held company that just won approval to sell the first drug that aims to boost a woman’s libido.

Under the terms of the deal, Valeant will pay one $500 million cash installment upfront and one early next year for Sprout and its pink libido pills that will be sold under the brand name Addyi.

Sprout is also eligible for a share of future profits based on the achievement of certain milestones. The Wall Street Journal had reported the deal talks late Wednesday.

Canada-based Valeant will also take on Sprout’s leadership team as they complete preparations to begin sales of the drug later this year.

Sprout will become a unit of Valeant, keeping its headquarters in Raleigh, N.C.

The acquisition is scheduled to close in the third quarter. Valeant expects the deal to add moderately to its earnings in 2016.

“What we’re counting on is it will be a multi-hundred million dollar product,” Valeant CEO Michael Pearson said in an interview.

The move is the latest in a string of deals for Valeant, which has used multibillion-dollar acquisitions of companies like Bausch & Lomb, Medicis and most recently Salix to build up portfolios of eye, skin and stomach products. It has projected revenue this year of $10.7 billion to $11.1 billion.

Lately, Valeant has been trying to diversify the company’s portfolio even further, with recent deals for cancer-drug company Dendreon and Egypt’s biggest drug maker, Amoun Pharmaceutical.

The acquisition of Sprout will take Valeant into the market for women’s health products. Because it is the first drug of its kind to win approval, Addyi, known generically as flibanserin, will avoid the kind of competition that can diminish commercial prospects.

“There is no better way to enter a specialty space than with a unique product that has such great interest,” Mr. Pearson said.

Also, Valeant, which sells drugs around the world, has more resources than Sprout to move more quickly introducing Addyi to markets outside the U.S. That could boost sales even further, Mr. Pearson said.

But to achieve success, Valeant will need to overcome concerns about the drug’s safety and effectiveness, as well as debate in the medical community about whether low sexual desire is a real condition.

Addyi was approved for premenopausal women by the Food and Drug Administration on Tuesday, after a lobbying campaign partly supported by Sprout that highlighted the opportunity to “even the score” with men who have access to sexual-dysfunction drugs, such as Viagra and Cialis.