The multistate negotiations were led by the attorneys general of California, Colorado, Illinois, and Oregon.
Albertsons operates in California through subsidiaries including Safeway and Vons.
"This agreement is part of our ongoing fight to bring help and healing to communities harmed by the opioid crisis," Bonta said.
Bonta said his office had "worked closely with our coalition partners to hold corporate actors accountable for fueling this public health crisis." He added that the state would "continue to address the epidemic from all angles and support individuals and families affected by it."
The parties have agreed only on the total monetary figure. "[I]mportant negotiations — including with respect to injunctive relief — remain," the AG's office said.