Pork prices are rising in China as Beijing struggles to contain the spread of African swine fever, while a trade battle with the U.S. will make it harder to replace domestic supply with imports.

Since Thursday, three outbreaks of African swine fever have been identified in Anhui province west of Shanghai—where around 15 million pigs live—bringing the total to seven.

The...