The proposed deals with CVS and Walgreens mark the latest chapter of a long legal saga, in which firms have faced claims they helped drive the abuse of addictive painkillers.
Settlements with drugmakers and distributors have already brought in more than $30bn.
The pharmacies have denied wrongdoing.
But they have lost some high-profile, smaller legal battles recently, with a judge ordering the two firms and Walmart to pay more than $650m (£567m) to two Ohio counties.
CVS chief executive Karen Lynch said on a call with analysts that the settlement was in the "best interests of all parties and helps put a decades-old issue behind us".
Local governments, Native American tribes and others behind the total of more than 3,000 lawsuits will now decide whether or not to accept the settlement. It would allow them to funnel money to help them address the local costs of a crisis that the US says has claimed more than 560,000 lives since 1999.Lawyers for the plaintiffs that helped negotiate the deal called the proposal an "important step" to holding the pharmacies "accountable".
"Once effectuated, these agreements will be the first resolutions reached with pharmacy chains and will equip communities across the country with the much-needed tools to fight back against this epidemic and bring about tangible, positive change," the legal team said in a statement.
Since former US President Donald Trump declared the opioids epidemic a national emergency in 2017, the situation has worsened.
Overdoses involving opioids jumped 30% in 2020 and another 15% last year, with illegally manufactured fentanyl driving the recent crisis,
The situation has strained public resources, with the economic toll of the opioid crisis in 2020 alone mounting to $1.5tn, according to a congressional report last month.
Advocate, author and recovering addict Ryan Hampton said many are ready for the years of legal fighting to end, but that the settlements have fallen short of early hopes. He warned that policymakers will need to commit more resources if they hope to do more than make a dent in the crisis.
"It is my hope that these dollars are put to use immediately on the ground, 100% of them," he said. "That's my hope. My fear is that when the dollar are distributed... that yes, it's not nothing but it's nowhere near enough."
While the settlements often outline how the funds should be spent - sending funds to facilities that offer treatment programmes, for example - Mr Hampton said the jury is still out on the overall impact.
"They're much needed but are we really just plugging a hole in the dam at this point?" he said. "We're going to need massive federal investment that goes beyond litigation dollars if we're going to get anywhere near preventing these tragic overdose deaths."
In the lawsuits brought by local communities, Native American tribes and other parties since 2017, the pharmacy chains were accused of ignoring red flags while handling prescriptions for the drugs.
CVS said it would pay about $5bn over 10 years to settle the claims, while Walgreens Boots Alliance has agreed to pay $5.7bn over 15 years.
Walmart has also reached a $3.1bn deal, Reuters reported. Walmart declined to comment.