The case was on a small farm with four pigs inside the restriction zone where the disease is common among wild boar, the Brandenburg state health ministry said.
ASF was found in two nearby farms late last week.
China and a series of other pork buyers banned imports of German pork in September 2020 after the first case was confirmed in wild animals.
The discovery in farms is not expected to have a major market impact as German pork exports are already subject to bans from many importers outside the EU, experts said on Friday.
The disease is not dangerous to humans but it is fatal to pigs. Many countries impose bans on pork from regions suffering from the disease.