Anti-Chinese sentiment in the United States began in the 19th century, shortly after Chinese immigrants first arrived in North America, and persists into the 21st century. This prejudice has manifested in many forms, including racist immigration policies, violence, and massacres. The first major wave of anti-Chinese violence occurred in the 1860s during the construction of world's first transcontinental railroad, driven by job competition with American workers and negative (unsubstantiated) reports from Americans who had lived in China.

Violence against Chinese in California, Oregon, Washington, and throughout the country took many forms, including pogroms; expulsions, including the destruction of a Chinatown in Denver; and massacres such as the Los Angeles Chinese massacre of 1871, the Rock Springs massacre, and the Hells Canyon massacre. Anti-Chinese sentiment led to the federal Chinese Exclusion Act of 1882, which banned the naturalization and further immigration of people of Chinese descent. Amid discussions of "Yellow Peril", anti-Chinese sentiment was eventually extended to all Asians, leading to the broader Asian Exclusion Act of 1924.

Although relations between the US and China normalized after the Sino-Soviet split and the 1972 visit by Richard Nixon to China, anti-Chinese sentiment has increased in the United States since the end of the Cold War, especially since the 2010s and in the 2020s, and its increase has been attributed to China's rise as a superpower, which is perceived as a primary threat to America's position as the world's sole superpower. In response to rising anti-Chinese violence and exclusionary legislation, Chinese immigrant communities organized politically and socially. Groups such as the Chinese Consolidated Benevolent Association submitted petitions, supported legal challenges, and published newspaper accounts that documented discrimination and contested dominant narratives portraying Chinese immigrants as passive or undesirable. Since 2019, xenophobia and racism have increased due to the COVID-19 pandemic, which was first detected in Wuhan, China. This has led to heightened discrimination and violence against Chinese individuals and those perceived to be of Chinese descent, particularly Asians. This surge in xenophobia is a continuation of the long history of anti-Chinese sentiment in the United States.

Early Chinese immigration to the United States

The arrival of three Chinese sailors to Baltimore in 1785 marked the first record of Chinese people in the United States. During the California Gold Rush in the mid-19th century, many Chinese immigrants came to the U.S., particularly the West Coast states, where they worked as gold miners and on large labor projects, including the transcontinental railroad. Economic and social instability in China, including the decline of the Qing Dynasty, led to increased emigration, especially from Guangdong province. This migration coincided with the growth of American industry, and Chinese workers were often employed in labor-intensive jobs. Chinese people were considered by employers as "reliable" workers who would continue working, without complaint, even under destitute conditions.

In the 1850s, the stock character John Chinaman began appearing in minstrel songs. John Chinaman was caricatured as effeminate and unmanly, with many songs centering on his failed pursuit of Caucasian women.

Chinese migrant workers encountered considerable prejudice in the United States, especially by the people who occupied the lower layers in white society, and Chinese "coolies" were used as a scapegoat for depressed wage levels by politicians and labor leaders. Cases in which Chinese people were physically assaulted include the Chinese massacre of 1871 in Los Angeles and the 1982 murder of Vincent Chin in Detroit. The 1909 murder of Elsie Sigel in New York, for which a Chinese person was suspected, was blamed on the entire Chinese community and led to physical violence. "The murder of Elsie Sigel immediately grabbed the front pages of newspapers, which portrayed Chinese men as dangerous to "innocent" and "virtuous" young white women. This murder led to a surge in the harassment of Chinese in communities across the United States."

The emerging American trade unions, under such leaders as Samuel Gompers, also took an outspoken anti-Chinese position, regarding Chinese laborers as competitors to white laborers. Only with the emergence of the international trade union Industrial Workers of the World did trade unionists start to accept Chinese workers as part of the American working-class.

During this period, the phrase "yellow peril" was popularized in the U.S. by newspapers owned by William Randolph Hearst. It was also the title of a popular book by an influential U.S. religious figure, G. G. Rupert, who published The Yellow Peril; or, Orient vs. Occident in 1911. Based on the phrase "the kings from the East" in the Christian scriptural verse Revelation 16:12, Rupert made the claim that China, India, Japan and Korea were attacking the West, but that Jesus Christ would stop them. In his 1982 book The Yellow Peril: Chinese Americans in American fiction, 1850–1940, William F. Wu states that "Pulp magazines in the 30s had a lot of yellow peril characters loosely based on Fu Manchu... Most were of Chinese descent, but because of the geopolitics at the time, a growing number of people were seeing Japan as a threat, too."

Dr. Sun Yat-sen argued that the uneducated and unsophisticated behavior of many Chinese immigrants at the time left poor impressions on Americans, leading some major American hotels to exclude them.

In the western states, "Anti-Chinese Leagues" were formed in cities such as Tombstone, Arizona, San Francisco, and Santa Rosa, California. Anti-Chinese riots, expulsions and massacres broke out in several western localities: Los Angeles, CA (1871), San Francisco, CA (1877), Denver, CO (1880), Eureka, CA (1885), Rock Springs, WY (1885), Tacoma, WA (1885), Seattle, WA (1886), Chinese Massacre Cove, OR (1887).

Chinese Exclusion Act and legal discrimination

In 1862, the Anti-Coolie Act specifically taxed Chinese immigrants at rates over half their income to suppress their jobs and economic participation per yellow peril tropes popular at that time.

In the 1870s and 1880s, various legal discriminatory measures were taken against Chinese people. A notable example is that after San Francisco segregated its Chinese school children from 1859 until 1870, the law was amended in 1870 so the requirement to educate Chinese children could be dropped entirely. The amendment of the law led to Tape v. Hurley, 66 Cal. 473 (1885), a landmark court case in the California Supreme Court in which the Court ruled that the exclusion of a Chinese American student, Mary Tape, from public school based on her ancestry was unlawful. However, the legislation was passed at the urging of the San Francisco Superintendent of Schools Andrew J. Moulder after the school board lost its case and a segregated school was established.

Another key piece of legislation was the Naturalization Act of 1870, which extended citizenship rights to African Americans but barred Chinese from naturalization on the grounds that they and other Asians could not be assimilated into American society. Unable to become citizens, Chinese immigrants were prohibited from voting and serving on juries, and dozens of states passed alien land laws that prohibited non-citizens from purchasing real estate, thus preventing them from establishing permanent homes and businesses. The idea of an "unassimilable" race became a common argument in the exclusionary movement against Chinese Americans. In particular, even in his lone dissent against Plessy v. Ferguson (1896), then-Supreme Court Justice John Marshall Harlan wrote of Chinese people as: "a race so different from our own that we do not permit those belonging to it to become citizens of the United States. Persons belonging to it are, with few exceptions, absolutely excluded from our country. I allude to the Chinese race."

In 1873, the Pigtail Ordinance targeted Qing dynasty immigrants' largely mandatory queue hairstyle which intended to reduce Qing immigration by banning their hairstyle which they must have to enable customary later re-entry to China. The city board passed it but the mayor vetoed it. The city council enacted it in 1876 but was struck down as unconstitutional in 1879.

In the US, xenophobic fear of the alleged "Yellow Peril" led to the implementation of the Page Act of 1875 which excluded Chinese women from entering the US per yellow peril and dragon lady stereotypes, the 1882 Chinese Exclusion Act, expanded ten years later by the Geary Act which required Chinese to register and secure a certificate as proof of entry at risk of deportation or hard labor, removed Chinese as witnesses in court proceedings, and removed Chinese as recipients of habeas corpus in legal proceedings. The Immigration Act of 1917 then created an "Asian Barred Zone" under nativist influence.

The 1879 Constitution of the State of California prohibited the employment of Chinese people by state and local governments, as well as by businesses which were incorporated in California. Also, it delegated the power to remove Chinese people to the local governments of California.Article XIX of the Constitution of the State of California of 1879 Whitman, James (2017) Hitler's American Model: The United States and the Making of Nazi Race Law. Princeton University Press. p. 35.

In 1880, the elected officials of the city of San Francisco passed an ordinance which made it illegal to operate a laundry in a wooden building without a permit from the Board of Supervisors. The ordinance delegated the power to grant or withhold the permits upon the Board of Supervisors. At the time, about 95% of the city's 320 laundries were operated in wooden buildings. Approximately two-thirds of those laundries were owned by Chinese people. Although most of the city's wooden building laundry owners applied for a permit, only one permit was granted of the two hundred applications from any Chinese owner, while virtually all non-Chinese applicants were granted a permit.only one out of approximately eighty non-Chinese applicants was denied a permit However, this led to the 1886 Supreme Court case Yick Wo v. Hopkins, that was the first case where the Supreme Court ruled that a law that is race-neutral on its face, but is administered in a prejudicial manner, is an infringement of the Equal Protection Clause in the Fourteenth Amendment to the U.S. Constitution..

Discriminatory laws, in particular the Chinese Exclusion Act of 1882, were aimed at restricting further immigration from China. It was the first law to racially exclude persons and leave them intentionally unprotected by law. The Chinese Exclusion Act of 1882 was repealed by the Chinese Exclusion Repeal Act of 1943. The Chinese Exclusion Act allowed limited college students entry into the US; however, it became increasingly difficult for such immigrants to gain access. By 1900, laws restricted Chinese students from entering the country unless they came from a wealthy family, they sought studies in programs not offered in China, and required a return to China after completing their studies. Heavy discrimination against Chinese students made it difficult for the US to expand international education opportunities in China and limited the ability of US colleges and universities from improving the reputation of their institutions.