Hamburg, Germany — Heiko Maas may be about to learn where the road being paved with his good intentions will lead. A Social Democrat and the current federal justice minister, he has announced ambitious plans to rid the internet of abusive and offensive language. His plans have incited concern in the German offices of Twitter and Facebook and may ensure that he goes into history books as the politician who brought the curtain down on free speech on social media in Germany.

Mr. Maas’s plans, which center on legislation allowing legal actions against online insults, libel and sedition, take aim at several real problems, including a sharp increase in hate crimes against more than one million new migrants and refugees to Germany and the spread of “fake news” that, in his view, helped Donald Trump win the American election. And they come after his own failed attempt to get social media companies operating in Germany to agree to self-regulation. Despite promises by Facebook to crack down on harmful speech, Mr. Maas says Facebook still deletes only 39 percent of punishable content, and Twitter only 1 percent. After years of negotiations the minister, quite understandably, has run out of patience.

Recently he proposed a law obliging social media to erase “obviously illegal” content within 24 hours after a complaint. In less obvious cases, the deadline is one week. If the networks don’t comply, they face fines of up to 50 million euros, or $55 million. The law is expected to be ratified by Parliament before it goes on its summer break. But even as a proposal, its chilling effect on freedom of expression can already be felt; Twitter is now blocking accounts in Germany that have even the slightest whiff of hate speech.

One such account is called @einzelfallinfos — roughly, “individual case reports.” The account’s name mocks the mainstream narrative in Germany that crimes committed by refugees and migrants are “individual cases” — something the account’s operators clearly dispute. Instead, they see a “recurring pattern” of sexual assaults against women perpetrated by young men of mostly Arab origin. So they persistently post official police reports about, as they put it, “crimes committed by refugees, migrants, and presumed migrants.”