Anthem Inc. will pay $23.65 million to resolve a class action claiming the company’s $5.1 billion 401(k) plan offered high-fee mutual fund share classes and paid excessive record-keeping fees to Vanguard Group Inc.

The deal requires Anthem to give employees more information about the risks tied to certain plan investments and hire an outside investment consultant to advise on the plan’s investment lineup. Anthem also agreed to consider hiring a new plan record keeper, according to court papers filed April 5.

With this deal, Anthem joins a growing list of large employers to sign multi-million dollar settlements in cases challenging...