WASHINGTON—A federal judge on Monday struck down a Department of Housing and Urban Development rule that aimed to make it easier for plaintiffs to file allegations of housing discrimination.

The HUD regulation, issued in February 2013, was designed to make it easier to enforce a 45-year-old law to combat alleged discrimination by lenders, insurers, landlords and municipalities.

U.S....