Based on highly disaggregated customs data from 2016–19, this paper investigates the impact of the China–U.S. trade war on the exports of Chinese firms, from the perspective of the extensive margin of product scope. The paper finds that the rise in U.S. import tariffs during the trade war led to Chinese exporters concentrating on production of their core products and shrinking their export scope. Higher import tariffs resulted in an average 2.43 percent decline in export scope and an average 1.25 percent increase in the export share of core products. The damage was particularly pronounced for intermediate products and heterogeneous products, which is consistent with the high duties. The paper provides direct evidence on the harm to export diversification caused by the China–U.S. trade war, suggesting a welfare loss from the decrease in product variety, as emphasized in the literature. This result holds after controlling for factors such as production cycles and heterogeneity.