The settlement will pay for claims by current and former Wal-Mart employees in the U.S. and Puerto Rico that they were unable to obtain health insurance for their same-sex spouses from 2011 to 2013. About 380 claims have been submitted.
U.S. District Judge William Young approved the settlement after a brief hearing in federal court in Boston.
The lawsuit was filed in 2015 by Jacqueline Cote, a Wal-Mart employee from Massachusetts who said the company denied medical insurance for her wife. Bentonville-based Wal-Mart Stores Inc. began offering benefits for same-sex spouses in 2014.
Cote, whose wife died of ovarian cancer in 2016, said she was pleased Wal-Mart was willing to resolve the issue for her and other associates who are married to someone of the same sex.
"It's a relief to bring this chapter of my life to a close," she said in a statement.
Wal-Mart's senior vice president for global benefits, Sally Welborn, said the company was happy to resolve the case.
"We will continue to not distinguish between same and opposite sex spouses when it comes to the benefits we offer under our health insurance plan," Welborn said in a statement.
Cote was represented by the Boston-based group GLBTQ Legal Advocates & Defenders, the Washington Lawyers' Committee for Civil Rights & Urban Affairs and private law firms.