The cost to move a container across the Pacific fell by more than one-quarter last week, the biggest decline in two years. The decline signals that the huge demand for Asian exports is easing, though shipping executives say it will be months before the logjam of ships outside of U.S. ports clears up.

The decline in ocean-freight rates coincides with the winding down of the traditional peak shipping season, which starts in August when Western importers start to load up on cargo ahead of the year-end holidays. With most products...

The cost to move a container across the Pacific fell by more than one-quarter last week, the biggest decline in two years. The decline signals that the huge demand for Asian exports is easing, though shipping executives say it will be months before the logjam of ships outside of U.S. ports clears up.

The decline in ocean-freight rates coincides with the winding down of the traditional peak shipping season, which starts in August when Western importers start to load up on cargo ahead of the year-end holidays. With most products at least on their way, space is gradually opening up on the front end of the trip, leading to lower prices.

That easing hasn’t made its way to U.S. ports, where dozens of ships packed with everything from Christmas trees to electronics and heavy machinery are still waiting for weeks to unload at big gateways like Los Angeles and Long Beach, Calif. Shipping executives say they don’t expect the traffic to ease until February at the earliest.

Trucks lined up last week to enter a Port of Oakland shipping terminal in California. Big U.S. importers have struggled to replenish their inventories.

Photo: Noah Berger/Associated Press

“It could be months before the logjams ease, but if we don’t get more closures at ports, the volumes should become more manageable after Chinese New Year,” said Lars Jensen, chief executive of Denmark-based Vespucci Maritime.

The cost to move a container from China to the U.S. West Coast fell 26% last week compared with the week before to $13,295, according to the Freightos Baltic Index. That is still more than three times as high since the start of the year when the same box cost $4,200.

Freightos head of research Judah Levine said it was the first decline since June in the premium cargo owners pay to secure space on ships.

Analysts and freight forwarders said there are fewer ships with short-term charters sailing across the Pacific after wholesale inventories rose 13% year over year in September, according to the U.S. Census Bureau.

Big importers such as Amazon.com Inc., Walmart Inc. and Home Depot Inc. account for around one-quarter of all imports that sail into the U.S. West Coast. They have been struggling to replenish their inventories since late July, when freight rates shot up more than 70% within a couple of weeks.

California’s Port of Los Angeles is struggling to keep up with the crush of cargo containers arriving at its terminals, creating one of the biggest choke points in the global supply-chain crisis. This exclusive aerial video illustrates the scope of the problem and the complexities of this process. Photo: Thomas C. Miller The Wall Street Journal Interactive Edition

Demand for ship space has been so high that some of these retailers chartered their own vessels to bring in cargo like decorations, gadgets and other hot-selling items before Christmas.

“The inventory numbers suggest that big retailers have stocked up and ordered early during the port delays,” said Jonathan Roach, a container analyst at London-based Braemar ACM Shipbroking.

The Lunar New Year this year falls on Feb. 1, when millions of workers go on break for at least a week to visit families and manufacturing output in China falls substantially.

With more capacity from big vessels expected to come on line, freight forwarders say dozens of smaller ships that have been chartered since the early summer will gradually withdraw to smaller, regional trade routes.

These smaller ships cost twice as much to operate, with the average cost per box across the Pacific at around $30,000, according to freight forwarders.

For now, the wait to dock in the gateways of Southern California continues unabated. There are around 80 boxships waiting to unload at Los Angeles and Long Beach for two weeks or more.

“I’ve never seen so many smaller ships like ours waiting to dock outside L.A.,” said Madalin Butoi, captain of the Hyundai Express, a Greek-operated vessel with 5,000 boxes that has been stuck outside the port since Oct. 3 after sailing in from South Korea.

“Everybody has gone bonkers to secure space on any kind of ship,” he said. “It will become better, but it won’t happen this year.”

Write to Costas Paris at costas.paris@wsj.com