This study empirically investigates whether countries enjoying trade diversion in the US market increased their imports from China during the US?China tariff war. To identify the input?output linkages in the trade statistics, we exploit the harmonized system coding structure. Using this method, we examine trade by East Asian countries, Southeast Asian countries, and Mexico in the general and electric machinery industries from January 2017 to December 2021. We regress imports of upstream products from China on exports of their downstream products to the US, which are instrumented by the US tariffs against goods from China. We found that some countries, such as Taiwan, Malaysia, and Thailand, enjoyed trade diversion effects in the US market. Among them, only Thailand increased imports of upstream products from China to produce downstream products, especially in terms of the intensive margin. Next, we demonstrate that the rise of US tariffs against goods from China increased China’s upstream exports to the world (including the US) and did not change those of downstream products significantly. These results imply that China’s total exports in the general and electric machinery industries have increased compared with the pre-tariff war period.