In early 2015, an anonymous comment accusing a Florida company of being a scam was posted on a consumer website called RipoffReport.com.

Around that time, the publication’s phone rang. The caller said he was Matthew Whitaker—now the acting attorney general—and he was angry, said Ed Magedson, owner of Ripoff Report. Using profanity, Mr. Whitaker demanded the removal of all negative reports about the company, World Patent Marketing Inc., Mr. Magedson said.

“He...