Anti-American sentiment in mainland China

There is a history of anti-Americanism in China, beginning with the general disdain for foreigners in the early 19th century that culminated in the Boxer Rebellion of 1900, which the United States Marine Corps participated with other powers in suppressing. The 1905 Chinese boycott of American goods to protest discrimination against the Chinese living in America had a major negative impact on Chinese attitudes. After the Chinese Civil War, the United States and China fought an undeclared war during the Korean War, in which 148,000 Chinese soldiers died, that left bitter feelings on both sides. Relations warmed up after 1970, but large-scale anti-American sentiments significantly increased since US President Donald Trump launched a trade war against China in the late 2010s.

1905 boycott
In response to severe restrictions on Chinese immigration to the United States, the overseas Chinese living in the United States organized a boycott whereby people in China refuse to purchase American products. The project was organized by a reform organization based in the United States, Baohuang Hui. Unlike the Boxers, these reformers were modernizers. The Manchu government had supported the Boxers, but these reformers—of whom Sun Yat-sen was representative, opposed the government. The boycott was put into effect by merchants and students in the south and central China. It made only a small economic impact because China bought few American products apart from Standard Oil's kerosene. Washington was outraged and treated the boycott as a Boxer-like violent attack, and demanded the Peking government stop it or else. President Theodore Roosevelt asked Congress for special funding for a naval expedition. Washington refused to consider softening the exclusion laws because it responded to deep-seated anti-Chinese prejudices that were widespread, especially on the West Coast. It now began to denounce Chinese nationalism. The impact on the Chinese people, in China and abroad, was far-reaching. Jane Larson argues the boycott, "marked the beginning of mass politics and modern nationalism in China. Never before had shared nationalistic aspirations mobilized Chinese across the world in political action, joining the cause of Chinese migrants with the fate of the Chinese nation."

Wang Jingwei regime
During the World War II, Wang Jingwei regime established the Anti-British-American Association of the Chinese Nation to organize anti-American activities.

Cold War
During the Second Sino-Japanese War and World War II, the U.S. provided economic and military assistance to the Chiang Kai-shek regime against the Japanese invasion. In particular, the "China Hands" (American diplomats known for their knowledge of China) also attempted to establish diplomatic contacts with Mao Zedong's communists in their stronghold in Yan'an, with a goal of fostering unity between the Nationalists and Communists. However, relations soured after the communist victory in the Chinese Civil War and the relocation of the Chiang regime to Taiwan, together with the start of the Cold War and rise of McCarthyism in U.S. politics. While the U.S. initially expected the Chiang regime to quickly fall, China and the U.S. fought a major undeclared war in Korea, 1950–53 and, as a result, President Harry S. Truman began advocating a policy of containment and sent the United States Seventh Fleet to deter a possible communist invasion of Taiwan. The U.S. signed the Sino-American Mutual Defense Treaty with Taiwan which lasted until 1979 and, during this period, the communist government in Beijing was not diplomatically recognized by the U.S. By 1950, virtually all American diplomatic staff had left mainland China, and one of Mao's political goals was to identify and destroy factions inside China that might be favorable to capitalism.

Mao initially ridiculed the U.S. as "paper tiger" occupiers of Taiwan, "the enemy of the people of the world and has increasingly isolated itself" and "monopoly capitalist groups", and it was argued that Mao never intended friendly relations with the U.S. However, due to the Sino-Soviet split and increasing tension between China and the Soviet Union, US President Richard Nixon signaled a diplomatic re-rapprochement with communist China, and embarked on an official visit in 1972. Diplomatic relations between the two countries were eventually restored in 1979. After Mao's death, Deng Xiaoping embarked on economic reforms, and hostility diminished sharply, while large-scale trade and investments, as well as cultural exchanges, became major factors. Following the Tiananmen Square protests of 1989, the U.S. placed economic and military sanctions upon China, although official diplomatic relations continued.

Since 1990
Anti-American and Chinese nationalist sentiments both surged following the Yinhe incident of 1993, which was sparked when a Chinese ship was detained by the US Navy in international waters, the ship allegedly contained chemical components which were headed for Iran, but it was eventually cleared after months of inspections. The Third Taiwan Strait Crisis in 1996 has led the Chinese government to be concerned about a supposed China containment policy, and began viewing the United States as responsible for major issues that arise in the bilateral relationship between China and Taiwan, as the Chinese government believed that American support of Taiwan is an effort to weaken China. During this time, there was also a sense of disillusionment with the U.S. among Chinese intellectuals, and popular books such as China Can Say No criticized U.S. foreign policy towards China and promoted grass-roots Chinese nationalism. Relations were severely strained by the U.S. bombing of the Chinese embassy in Belgrade on May 7, 1999, which was caused by an intelligence error, according to reports which were compiled and broadcast by U.S. media outlets, but several foreign sources claimed that the incident was deliberate, a claim which was believed by many Chinese. The bombing, along with the perceived lack of an apology from the U.S., led to massive protests in Beijing and other major Chinese cities. In 2001, diplomatic relations were further damaged by the Hainan Island incident, which was sparked when a collision between a U.S. aircraft and a Chinese aircraft resulted in the death of the Chinese pilot and the detention of the 24 American crew members.

While the Chinese government officially condemned the September 11 attacks, the Chinese state-run media produced books, films and video games which glorified the terrorist attack as a "humbling blow against an arrogant nation. The Washington Post recorded the mixed reactions among the general public after the attack had been reported: “While average Chinese routinely approach Americans to offer condolences for Tuesday's terrorist attacks, many others in their offices, schools and Internet chats have voiced satisfaction at what they describe as a well-deserved blow against U.S. arrogance.” Nicholas Kristof of the New York Times considered the schadenfreude at 9/11 he saw on Chinese internet as a sign of rapidly increasing Chinese nationalism. A 2001 Harris poll conducted 2 months afterwards also showed that Beijing respondents were much more likely to disapprove of the U.S. government's military actions against terrorism compared to Japanese, South Korean, and American respondents. However, it was noted that the Chinese discourse primarily revolved around revenge against U.S. state policy instead of hatred for Americans, and a 2002 survey of Chinese netizens in light of 9/11 found that "international cooperation" was among the policies most would favour for fighting terrorism. A Chinese media report on the 2019 anniversary of 9/11 also suggested there to be more restrained rhetoric online in discussing the topic compared to the past.

Obama administration
Although the election of US President Barack Obama was positively received in China in 2008  and a temporary increase in favorable views of the U.S., it also signified a shift in American foreign policy towards the country, as then Secretary of State Hillary Clinton called for a "Pivot to Asia", or rebalancing of U.S., strategic and economic interests in East Asia, specifically freedom of navigation patrols in the South China Sea. This move was widely seen as attempts to counter Chinese interests in the region, and in response, the Chinese military began their own buildup in the region, such as the creation of its own Air Defense Identification Zone. Recently, in 2009, Luo Ping, a director-general at the China Banking Regulatory Commission, criticized America's laissez-faire capitalism and said that he hated America when the United States Treasury would start to print money and depreciate the value of the U.S. dollar, thus cheapening the value of China's purchase of U.S. bonds. Furthermore, China's leaders present their country as an alternative to the meddling power of the West. In 2013, 53% of the Chinese surveyed had an unfavorable view of the U.S., which slightly improved in 2016 where 44% of those surveyed had an unfavorable view compared to 50% expressing a favorable one.

A poll of 500,000 Chinese netizens, conducted by Hong Kong's Phoenix Television in 2011 suggested that 60% of those surveyed agreed Osama bin Laden's death was a sad event because "he was an anti-US warrior". However, another report by Public Radio International documented more mixed responses on Chinese social media, and noted that most users did not care about his death.

Chinese hackers have also waged cyberwarfare against American institutions. Quartz suggested that certain Hollywood films such as Django Unchained were allowed to slip past China's film censorship, because they depicted a negative view of American society. It alleges that the film "depicts one of America's darker periods, when slavery was legal, which Chinese officials like to use to push back against criticism from the United States".

After the China-U.S. strategic competition begins
There has been a significant increase in anti-US sentiment since the Trump administration launched a trade war against China, with Chinese media airing Korean War films. In May 2019, Global Times has said that "the trade war with the U.S. at the moment reminds Chinese of military struggles between China and the U.S. during the Korean War."

According to SET News, a minority of Chinese online believe that the coronavirus outbreak in Wuhan is a genetic bio-attack executed by United States. Some scholars believe that the CCP is employing an evolving set of anti-American narratives to try to shore up its legitimacy in response to rising domestic challenges, including a slowing economy, growing questions about Xi Jinping's personalization of power, and public dissatisfaction with the government's handling of COVID-19.

During the 2024 United States presidential election, Chinese netizens expressed anger in the face of Donald Trump's threat to impose tariffs of more than 60% on Chinese imported goods. Some think he would increase the odds of a war. The world will “never be at peace” with Mr Trump around, reckons another netizen. “This old madman is too vicious,” says a third. “He must be annihilated.”