CVS Health Corp. said Thursday it will close 900 stores over the next three years, nearly 10% of its U.S. locations, while adding more health services at remaining locations.

The largest U.S. pharmacy chain said it would close 300 stores a year while adding primary care offices at certain sites as well as converting more stores into so-called health hubs with offerings such as diagnostic testing, mental-health services and hearing exams.

“The...

CVS Health Corp. said Thursday it will close 900 stores over the next three years, nearly 10% of its U.S. locations, while adding more health services at remaining locations.

The largest U.S. pharmacy chain said it would close 300 stores a year while adding primary care offices at certain sites as well as converting more stores into so-called health hubs with offerings such as diagnostic testing, mental-health services and hearing exams.

“The company has been evaluating changes in population, consumer buying patterns and future health needs to ensure it has the right kinds of stores in the right locations for consumers and for the business,” CVS said in a statement.

In connection with the planned store closures, the company said it expects to record an impairment charge in the fourth quarter of 2021 of between $1 billion and $1.2 billion, or 56 cents to 67 cents a share of earnings.

A CVS spokesman said the company doesn’t yet have a list of which stores are closing, a process that will begin early next year.

CVS also said retail and pharmacy chief, Neela Montgomery, is leaving the company a year after taking the post. Ms. Montgomery, a former Crate & Barrel chief executive, joined CVS in November 2020 and will stay until the end of the year, the company said.

Two CVS executives will replace her as co-presidents of CVS’s retail business. Prem Shah, executive vice president of specialty pharmacy and product innovation, will assume the newly created role of chief pharmacy officer. Michelle Peluso, chief customer officer, will oversee front-store strategy.

CVS, with 10,104 locations at the end of 2020, added about 200 stores since 2018 while rival Walgreens Boots Alliance Inc. closed nearly 600 in that time. After decades of proliferation, the two giants comprise an ever-larger share of U.S. drugstores as independent pharmacies and small chains shut down or are acquired by CVS or Walgreens.

Both chains have played a key role in the rollout of Covid-19 vaccines during the pandemic. Retail pharmacies working in partnership with U.S. health officials have administered close to one-third of vaccines given to date, with CVS and Walgreens delivering the bulk of those shots.

In many cases, when a drugstore closes, CVS or Walgreens acquires the patient list and starts serving those customers at existing locations.

Staffing shortages have stressed both chains, as pharmacists and pharmacy technicians scramble to juggle Covid testing and vaccines with filling prescriptions and serving customers. CVS said it hired nearly 20,000 pharmacists, pharmacy technicians and nurses in the most recent quarter, which included a one-day career event meant to draw 25,000 new workers.

CVS said it plans to offer jobs elsewhere in the company to employees affected by the planned closures.

Before the pandemic, CVS and Walgreens each set courses to become bigger players in healthcare as they faced falling store sales and slowing profits on prescriptions. Walgreens recently struck a deal to take a controlling stake in VillageMD, a move to add hundreds of doctors to its stores.

CVS, which acquired insurance giant Aetna in 2018, initially said it didn’t need primary care doctors or practices to become a go-to for medical services, especially for those with costly chronic conditions. But the company reversed course in recent weeks and said it aims to add primary care physicians to its rolls given the central role the doctors play in determining a patient’s overall medical regiment.

Write to Sharon Terlep at sharon.terlep@wsj.com