It is the first time the dread disease has crossed from wild boar populations to domestic pigs in Germany.
One farm had only two pigs. The other was an organic herd of about 200 pigs. They have been slaughtered and strict quarantines are in place.
There have been 1,267 cases of wild pigs with the disease, prompting China to ban pork from Germany in 2020.