BEIJING—As China girds for an escalating trade fight with the U.S., it is facing increasing trouble on the home front from a slowing economy.

Spending on so-called fixed assets such as factory machinery and public works projects cooled to the lowest point in nearly two decades, the government reported Tuesday.

Other data also pointed to economic...