KHORGOS, Kazakhstan — China’s largest shipping company has poured billions of dollars into buying seaports in Greece and other maritime nations around the world. But the location of its latest foreign investment has given a curious twist to the expanding ambitions of the China Ocean Shipping Co.: The nearest ocean is more than 1,600 miles away.

The state-owned Chinese shipping giant, known as COSCO, became the 49 percent owner this past summer of a patch of frost-covered asphalt bisected by railway tracks and lined with warehouses in landlocked Kazakhstan. The barren wilderness close to the border with China stands near the Eurasian Pole of Inaccessibility, meaning that nowhere on the landmass of Europe and Asia is more distant from the sea.

But it is here, where huge, Chinese-made cranes load containers onto trains instead of ships, that China and Kazakhstan are embracing what they see as the new frontier of global commerce.

Forbidding as it is, the place is a central link in what President Xi Jinping of China trumpets as the “project of the century” — a $1 trillion infrastructure program known as “One Belt, One Road,” which aims to revive the ancient Silk Road and build up other trading routes between Asia and Europe to pump Chinese products to foreign markets.

The gamble is not only reshuffling global transport routes, but also shaking up Kazakh and global politics as China inserts itself deeper into a region that Russia considers squarely within its area of influence. Not least, it is testing the economic logic of China’s ability to carry out its grandest of ambitions.

Creating a transport hub — the Khorgos Gateway, a “dry port,” or terminal without water for handling cargo for trains rather than ships — in one of the world’s most remote places has involved an expensive exercise in social engineering.

A new town, called Nurkent, has been built from scratch — with apartment blocks, a school, kindergarten and shops to serve the railway workers, and crane operators, customs officials and other staff needed to keep the dry port running. Free housing is provided. The town has only about 1,200 residents, but there are plans to expand it for more than 100,000.

Zhaslan Khamzin, the chief executive of the company operating the dry port with help from DP World of Dubai, acknowledged that the place seemed inhospitable but, implausibly describing it as an “oasis,” insisted, “This is the future.”

The Chinese “are not fools,” he added. “Businessmen count their money. If they invest money here, they know that in five or 10 years they will get their money back with a profit.”

Kazakhstan’s border area with China was a sealed military zone during the Cold War, when the armies of China and the Soviet Union clashed briefly in 1969 along their shared frontier just north of Khorgos.

The biggest and richest country in the part of Central Asia formerly ruled from Moscow, Kazakhstan has tried since independence in 1991 to stay on good terms with Russia but has also steadily eroded Moscow’s once overwhelmingly dominant position in the region by expanding ties with China.

The dry port is just the latest step in deeper ties. Completion of an oil pipeline between Kazakhstan and China in 2009 broke an export pipeline monopoly previously held by Transneft, Russia’s state-owned pipeline company.

It was Kazakhstan’s president, Nursultan A. Nazarbayev, the country’s sole ruler since it broke from the imploding Soviet Union, who first proposed reviving old Silk Road trade routes.

The idea was later latched onto and expanded by China’s Communist Party leader, Xi, in a 2013 speech in Astana, the Kazakh capital, and figured prominently in the Chinese leader’s speech to an October party congress in Beijing that charted China’s future as a “great power.”

It takes 45 to 50 days to send goods from Chinese factories to Europe by sea, but less than half that time by train through Central Asia. Transporting a shipping container overland costs about 10 times as much as by sea, but it is relatively speedy and still much cheaper than airfreight.

That makes overland transport an attractive option for manufacturers of high-value, Chinese-made goods such as computers, which need to get to market quickly.

The Chinese president has made development of trade routes like the “new Silk Road” the signature policy initiative of his leadership, which has often put politics rather than economics in the driving seat.

Because China exports so much more than it imports, trains that pass westward through Central Asia laden with Chinese goods have often had to return to China with little on board, a mismatch that makes it difficult to justify the route’s costs.

To keep the trains running and encourage manufacturers to build factories in less developed areas, local governments in western China and elsewhere offer hefty subsidies that cut the cost of transporting a container by train through Central Asia by 30 to 40 percent.

Jittery about Chinese ambitions but anxious about being left out, Russia has both helped and hindered the project. Russia clearly worries that China could ultimately try to cut it out of the transport business to Europe by building up a route through Kazakhstan across the Caspian Sea that bypasses it altogether.

President Vladimir Putin of Russia gave a big boost to what China calls the “Silk Road economic belt” by pushing to establish the Eurasian Economic Union, a Russian answer to the European Union. Starting in 2015, Putin’s union has allowed cargo trains and trucks from Kazakhstan to pass into Russia without laborious customs inspections.

At the same time, Russia put up a serious obstacle when, in retaliation for Western sanctions over its 2014 annexation of Crimea, Moscow banned the import to and even transit through Russia of many European goods, particularly food.

Khamzin said this problem, though initially serious, was now easing as Russia lifts transit restrictions on various European products, including wine and meat.

Building a business amid such shifting political and economic sands, Khamzin said, is a gamble. But, he added: “If you don’t take risks, you won’t drink Champagne.”

Among those gambles is the creation of the town of Nurkent itself. Streets are clean and apartments comfortable, but young residents complain about the tedium of living and working alongside a small number of people in an isolated settlement surrounded by wilderness.

“We are not just colleagues but also neighbors. I see exactly the same people during and after work every day,” said Alexandra Chesnokova, Khorgos Gateway’s public relations manager, who likes her job but misses St. Petersburg, her previous home.

Despite plans to expand the town, some officials say that technology and automation could eventually eliminate, or at least significantly reduce, the need for people. Zhandos Abilakimov, a young information technology expert, said he “hopes that in future we can mostly remove the human factor.”

Andrew Higgins/The New York Times