The judge, Ian Trigger, said "hundred and hundred of thousands" of illegal immigrants were abusing the benefits system and that the system itself was "completely lax" and a drain on public finances, UK newspaper The Telegraph reports.
Justice Trigger made the comments as he was sentencing a drugs dealer to two years in jail last week.
But the Lord Judge, the Lord Chief Justice, has referred the comments to the Office of Judicial Complaints to determine whether it was too political. The Office is now investigating comments to determine whether the judge has overstepped the mark.
Jailing Lucien McClearley, 31, from Jamaica, for two years, Judge Trigger told Liverpool Crown Court that the level of illegal immigrants were "creating an enormous strain on resources" as they exploited Britain's generous welfare system.
The result was a growing hole in the public finances, he said. Judge Trigger told him: "Your case illustrates all too clearly the completely lax immigration policy that exists ... in this country.
"People like you, and there are literally hundreds and hundreds of thousands of people like you, come to these shores from foreign countries to avail themselves of the generous welfare benefits that exist here," the Telegraph reports.