When President Trump’s trade team presented Chinese officials with a list of bold economic demands in Beijing last May, one of China’s state-controlled news outlets, Global Times, panned the request and blared a curious headline: “Is it now 1840?”

Five months later, China’s national news agency, Xinhua, accused Vice President Mike Pence of lacking knowledge of China’s past after he complained that Beijing was merely paying lip service to opening its economy.

Behind the pushback is a long and painful history of China surrendering to Western powers, with origins in what the Chinese news media refers to as a “century of humiliation” that began with the “unequal treaties” of the 19th century after the first Opium War.

History has been haunting trade negotiations between the world’s two largest economies, which have dragged on for more than a year. While the administration’s requests surrounding forced technology transfer and subsidies of state-owned enterprises remain unresolved, the deepest division centers on the United States’ insistence of an enforcement mechanism that gives it power to impose tariffs if China abrogates its end of a trade agreement.

That issue is expected to be front and center on Thursday, when Steven Mnuchin, the Treasury secretary, and Robert Lighthizer, Mr. Trump’s top trade negotiator, will again try to make headway toward a final deal during a two-day visit to Beijing. Next week, a delegation of government officials from China is scheduled to come to Washington for additional talks.

As they work to agree on trade terms, Trump administration officials have outlined various situations for enforcing an agreement. Most recently, negotiators have called for a system in which representatives from both countries would meet to address problems that arise, escalating complaints to the top levels of government as necessary.

The Chinese have agreed to periodic meetings at the levels of office director, vice minister and minister, which would allow the United States to keep tabs on China’s behavior and air complaints from companies about unfair business practices. If China fails to keep its agreement, the United States would respond “proportionally but unilaterally,” Mr. Lighthizer said at a congressional hearing last month.

But China is resisting the Trump administration’s demand that the United States be allowed to impose tariffs if Beijing fails to keep its promises and that China agree not to retaliate with its own punitive measures.

The Trump administration says such a mechanism is necessary to ensure that China lives up to its agreement and does not repeat what it says is a pattern of reneging on past promises. But such disarmament has proved to be unpalatable in China, in part, historians say, because of stinging memories of one-sided treaties from an earlier era.

“Every schoolchild in China and every educated Chinese person knows about the ‘century of humiliation,’” said Stephen R. Platt, a historian and author of “Imperial Twilight: The Opium War and the End of China’s Last Golden Age.” “There’s a lingering memory of that history from the 19th century that goes a long way to explain the desire in China for a global trading order that works more on China’s terms.”

He added, “They have to look strong on trade.”

In 1839, the big trade war that gripped the world was between Britain and China’s Qing dynasty. Britain was buying large quantities of Chinese silk and tea, but China was buying little in return, creating an uncomfortably large trade deficit. So Britain turned to smuggling Indian opium, a product that proved hard to resist, into China, and its resistance turned a trade war into a real one.

The three-year war ended with the Treaty of Nanking, which gave Britain control of Hong Kong and opened several new trade ports in China. British merchants were allowed to come to China and trade freely with no restrictions.

That was just the beginning. By the 1850s, the United States, Russia and France signed treaties with China with the same terms, allowing foreigners to sell goods with low tariffs and giving them privileged status in mainland China. Rather than show respect for the superiority of Chinese culture, China was forced to adhere to the traditions of Western diplomacy. The influx of foreign culture reoriented China’s economy, eventually leading to the dynasty’s downfall in 1912.

Some historians, such as William C. Kirby, a professor of Chinese studies at Harvard Business School, argue that the unequal treaties did have benefits for China such as modernizing its institutions and its education system. However, that does not always mean that trade pacts are mutually beneficial.

“One should always be cautious that what is good for you, you imagine is good for the other party automatically,” Mr. Kirby said. “It might be, it might not be.”

Trump administration officials have tried to make the case that the changes it wants China to make will benefit everyone.

“The kinds of things that we’re asking for are not anti-Chinese at all,” Mr. Lighthizer told NPR this week. “In fact, the reformers would say it’s pro-Chinese. It will help their economy, not hurt their economy.”

Despite suggesting that their interests are aligned, it has been difficult for the United States to push China to make changes without coming across as bullying or insensitive. After talks stalled in February, Larry Kudlow, the director of the White House’s National Economic Council, said that Mr. Lighthizer read the “riot act” to Liu He, China’s vice premier and the country’s top trade negotiator.

It has also been hard for the Trump administration to sell the agreement as being two-sided. Mr. Trump has accused China of essentially stealing from the United States for decades and his administration is demanding that China buy more American goods, stop subsidizing its own companies and treat foreign companies fairly. In return, the United States has so far offered to remove some, but not all, of the $250 billion worth of tariffs Mr. Trump imposed last year.

“I consider that we’ve rebuilt China,” Mr. Trump said last week at an event in Ohio. “$500 billion a year taken out of our country,” he said, referring to the amount of Chinese goods imported into the United States.

China remains skeptical that many of the concessions that Mr. Trump is asking for will really help uplift its economy.

While old memories of humiliation might still be fresh in China’s collective mind, its status in the world has changed drastically in the last 150 years. Now the world’s second-largest economy, China has been exerting its own influence around the world.

Development programs like China’s Belt and Road Initiative, a global infrastructure investment plan, have drawn criticism from the United States and in parts of Europe for being insufficiently transparent and putting more vulnerable economies in precarious positions.

“Chinese policy has shifted from fear of being bullied into unequal treaties into becoming a bully itself and forcing unequal agreements on weaker nations,” said Michael Pillsbury, a China scholar at the Hudson Institute who advises the Trump administration.

But, Mr. Pillsbury points out, the Chinese do not see things that way when it comes to a trade deal with the United States. The Communist Party was founded nearly a century ago on a promise of putting a stop to humiliation at the hands of foreigners.

“The Communist Party was created on a narrative of standing up to, and ending, unequal treaties,” he said.