Germany is Europe's biggest pork producer and recently saw a surge in demand from China after it suffered an outbreak of the same disease.
Scientists detected swine fever in a dead wild boar in the eastern state of Brandenburg, the German agricultural ministry said on Thursday.
Authorities had been concerned about the disease crossing into the country from neighbouring Poland after a spate of cases were detected there last year.
China responded to the news by forbidding the import of all pig products and will return or destroy any products that have already shipped, a joint statement from the country's customs agency and agriculture ministry said.
(article continues below)
See also on The Local:
African swine fever is deadly among wild boars and domestic pigs, and highly contagious, but not harmful to humans.
Chinese authorities have been looking into a means of preventing African swine fever, with a vaccine under trial.
An outbreak of the disease in China last year saw millions of pigs slaughtered to prevent an epidemic.
Pork prices more than doubled last year as a result of the crisis, which also pushed up the cost of eggs and other meats as consumers switched to other protein sources.