Macy’s Inc. M 0.06% plans to close 125 department stores over the next three years, an admission that a fifth of its locations cannot thrive as shoppers buy more online and make fewer trips to malls.

The company is also cutting roughly 2,000 corporate jobs, or 10% of corporate and support staff, and closing several offices. It will abandon a dual headquarters in Cincinnati—a structure Macy’s has kept since 1994 when it was still one of the country’s biggest retailers—and put all headquarters roles in New York.

Macy’s, which will keep running about 400 of its namesake stores, is ramping up its restructuring efforts after a yearslong slump. Cobbled together from various regional chains, the company has struggled even as it left the weakest malls and boosted spending on e-commerce.

Once the backbone of America’s shopping malls, department-store chains like Macy’s, J.C. Penney and Sears have been losing customers to the convenience of Amazon.com Inc. AMZN 2.27% and the discounts found at off-price chains like T.J. Maxx.

“Our goal is to reclaim and revitalize what a department store should be,” Macy’s Chief Executive Jeff Gennette said in an interview. “Department stores are still vital if they are done right. There is viability to having many categories and brands under one roof.”

The retailer is testing a new concept that will take it out of malls by opening smaller stores in strip centers, where more people are shopping. And it’s continuing to look for profits from its real estate, including an office tower that it plans to build on top of its Herald Square flagship in New York City.

Mr. Gennette announced some of the changes internally on Tuesday and plans to share details with investors on Wednesday, as part of his updated strategy to overhaul the 161-year-old chain.

The moves will result in up to $480 million in restructuring charges. Macy’s expects to save $1.5 billion annually by the end of 2022, with $600 million in savings in the current fiscal year. Some of the money will be reinvested in technology and other upgrades, Mr. Gennette said.

The modern Macy’s was forged by the merger of Federated Department Stores Inc. and May Department Stores Co. to create the first national department store chain. After the 2005 merger, the company operated more than 800 department stores, including the Bloomingdale’s chain. Facing falling sales and fewer store visits, it announced plans in 2016 to close 100 of its weaker locations.

Share Your Thoughts

How can big retailers like Macy’s continue to innovate and increase revenue? Join the conversation below.

When Mr. Gennette took the helm of Macy’s in 2017, he set about streamlining its sprawling operations. He invested in high-performing flagships and so-called magnet locations that continue to draw shoppers. Since 2018, Macy’s has refurbished 150 of its best locations, and it plans to upgrade another 100 this year, Mr. Gennette said.

But a large chunk of its department-store fleet, which Mr. Gennette calls “neighborhood stores,” are in ailing malls that are losing customers. Mr. Gennette tried reducing the size of neighborhood stores and retooling what they sold, to no avail. “We didn’t find a solution,” he said.

About 125 neighborhood stores will close over the next three years, including roughly 30 closings for this year. (This year’s slate, which was announced in January, includes one Bloomingdale’s location.) Mr. Gennette said the final list of locations to be closed could change based on market conditions and the mall’s performance. Macy’s said the stores slated for closure have annual revenue of $1.4 billion.

In addition to roughly 400 Macy’s stores, the company will still operate about 40 Bloomingdale’s stores and the Bluemercury beauty chain, which has roughly 170 locations. It has also opened 216 Macy’s Backstage off-price stores, most of which  are located inside its namesake department stores.

Some analysts have called on the company to pare its footprint.

“Macy’s has too many square feet chasing too few customers,” said Craig Johnson, the president of consulting firm Customer Growth Partners, adding that the company hasn’t moved fast enough to close unproductive stores. “Sales are going down faster than they can eliminate physical space.”

Macy’s is still closing out its books for the year that ended Feb. 1, but it expects revenue fell 1.5% to $24.6 billion. It predicts that sales at stores open at least a year, which excludes the impact of closed stores, dropped 0.7%.

Mr. Gennette is opening new stores that will take Macy’s out of the malls. He plans to open smaller stores called the Market by Macy’s that will carry many of the same products and brands sold in a Macy’s department store, including apparel, accessories, home goods and beauty products.

The appeal of the new stores will be their location in shopping centers, which offer easy access off main roads, and their smaller size of about 15,000 square feet, which is one-tenth the size of a typical Macy’s, Mr. Gennette said.

Mr. Gennette said he plans to have four or five of the new stores open by year-end, including in Dallas, Fort Worth, Texas, and Washington, D.C. The company will also open seven free-standing Backstage stores this year.

“Our brick and mortar strategy won’t be constrained by our mall presence,” Mr. Gennette said. “We have options to expand off the mall.”

Macy’s is continuing to divest and redevelop its existing real estate, the vast majority of which it owns outright or through ground leases. Over the past four years it has generated $1.6 billion in proceeds from real-estate transactions. The company expects real-estate proceeds to total roughly $130 million this year.

“We have excess square footage in our parking lots,” Mr. Gennette said, describing it as land that could be sold and redeveloped by banks or fast-food restaurants.

The company also provided updated guidance for its fourth quarter and fiscal year, which it plans to report later this month. Macy’s now expects sales at stores open at least a year to fall 0.5% for the holiday quarter, beating a forecast that it had previously lowered. The company also expects full-year earnings at the high end of its previous forecast, which it reduced in November to a range of $2.57 to $2.77 a share.

Amazon posted another quarter of strong sales gains as it expands deeper into apparel and other categories, but many traditional chains have struggled to adapt to the consumer shifts and increased competition. Target Corp., Kohl’s Corp. and J.C. Penney Co. are expected to report lackluster holiday results later this month.

Others, including Barneys New York and teen chain Forever21, filed for bankruptcy protection last year. In November, the owner of Sears said it would shut 96 stores, leaving the once dominant chain with just 182 Sears or Kmart stores. Five years ago, there were nearly 2,000 Sears and Kmart locations.

Write to Suzanne Kapner at Suzanne.Kapner@wsj.com

Copyright ©2019 Dow Jones & Company, Inc. All Rights Reserved. 87990cbe856818d5eddac44c7b1cdeb8