United Parcel Service Inc. UPS 3.56% will freeze pension plans for about 70,000 nonunion employees, seeking to contain the burden of a retirement fund with a nearly $10 billion deficit.

The package carrier is the latest major U.S. corporation seeking to corral rising pension obligations, which have swollen after years of low interest rates. The collective deficit in pension plans of S&P 1500 companies totaled $408 billion at the end of last year, according to consulting firm Mercer.

The Atlanta-based company, which is spending billions to expand its network to handle the surge in e-commerce shipments, said Tuesday it will freeze pension benefits in five years for nonunion workers. It will move those individuals to 401(k) accounts and contribute funds to those retirement plans.

UPS has more than 434,000 workers worldwide, with more than 80% in the U.S. Most of them are unionized and won’t be affected by the changes. But the move could set up a showdown with the International Brotherhood of Teamsters, which represents 268,000 UPS workers and is preparing to negotiate a new contract.

A pension freeze puts UPS in line with a wide swath of American corporations. In 2014, 37% of Fortune 500 companies with defined benefit plans had frozen them in some way, compared with 35% with open plans, according to the consultancy Willis Towers Watson. That was the first year that frozen plans outpaced all other types, including closed or terminated. As recently as 2010, half of large companies with defined benefit plans were open.

Pension Gap / Funding level of UPS's U.S. pension plans Source: the company

UPS is trying to make a dent in a U.S. pension deficit that reached $9.85 billion at the end of 2016, according to its annual report. The plans, with $41.07 billion in obligations, were 76% funded at that point, down from nearly 90% at the end of 2013.

Like most corporate pension sponsors, UPS fell victim to historically low interest rates. Companies calculate the value of future benefits based on interest rates. Obligations rise when rates fall. A precipitous drop in interest rates—which have stayed lower for longer than many pension managers expected after the financial crisis—helped drive up the shipper’s deficit.

While interest rates have pushed up the obligations, UPS helped compound the problem, by neglecting to add enough to the plan to make the up the difference. Although the company contributed almost $5 billion into its fund between 2012 and 2016, it only made minimum contributions required by law in 2012. In 2013 it put no money into the plan.

UPS says it has adequately funded its pension. While it didn’t make a contribution in 2013, its pension deficit went down more than $3.6 billion that year due to interest rate changes. “We make funding decisions for each year and over a longer time horizon,” UPS Finance Chief Richard Peretz said in an interview.

UPS’s pension struggles mirror broader funding problems among companies that offer retirement benefits. The median S&P 1500 pension plan’s funded status was 76% at the end of 2016, according to a report by the financial strategies group at Citigroup Inc.

Companies are required by law to close those gaps over time, but the deficits have persisted, even though S&P 1500 firms collectively have contributed more than $550 billion into the plans from 2008 to 2016.

The ongoing cash drain is encouraging more executives to look for ways to stem the bleeding. “This costs a lot of cash, and the cash hasn’t resulted in a better funded status,” said Jason Richards, pension risk consultant at Willis Towers Watson.

Companies that freeze their pensions can later offer lump-sum payouts to active employees and potentially spin them off entirely to third parties, he explained. Those options aren’t available to plans that continue to accrue obligations to workers.

General Motors Co. , Verizon Communications Inc. and others have sold large pension obligations to insurers in recent years, as part of a multistep process that included freezing pension plans. Earlier this week, financial-services firm The Hartford offloaded $1.6 billion of its pension to Prudential Financial Inc.

UPS said its pension freeze will go into effect on Jan. 1, 2023 for affected employees, meaning they no longer accrue additional benefit for future service. The company had closed the pension plan to new hires in July 2016.

Under the new program, UPS will contribute 5% to 8% of employees’ annual compensation to their 401(k) accounts and match up to 3% of employee contributions. “It’s a fairly generous program we’re moving to despite freezing the defined benefit plan,” Mr. Gaut said.

UPS declined to say whether it would seek a similar concession from union members. “It’s way too premature to talk about anything relating to our future collective bargaining discussions,” Mr. Gaut said.

Teamsters spokesman Galen Munroe declined to comment.

Last year, UPS offered buyouts to all former UPS employees who were vested in the pension plan. Around 22,000 accepted the deal, accelerating $685 million in pension benefits that were due last year.

Corrections & Amplifications

The International Brotherhood of Teamsters union represents workers at United Parcel Service Inc. An earlier version of this article incorrectly named the union. (June 28, 2017)

Write to Paul Ziobro at Paul.Ziobro@wsj.com and Vipal Monga at vipal.monga@wsj.com