Seeking damages and unspecified appropriate relief for the harm caused, HUD said that Facebook also restricted who could see housing-related ads based on national origin, religion, familial status, sex and disability.
Facebook said it had been working with HUD on the issue and was surprised by the department's decision to issue the charge, having taken significant steps to prevent ads that discriminate across its platforms.
The social media giant said last week it would create a new advertising portal for ads linked to housing and employment that would limit targeting options for advertisers and pledged to build a tool that would allow users to search all current housing ads listed in the United States, regardless of whether the ads were directed at them.
The HUD charge said that Facebook enabled advertisers to exclude people whom the social network's data classified as parents, non-American-born, non-Christian, or a variety of other interests that closely align with the Fair Housing Act's protected classes.
"Facebook is discriminating against people based upon who they are and where they live," HUD Secretary Ben Carson said. "Using a computer to limit a person's housing choices can be just as discriminatory as slamming a door in someone's face."
Advertising practices at the world's largest social network, with 2.7 billion users and nearly $56 billion in annual revenue, have been under the microscope for about two years of growing discontent over Facebook's approach to privacy and user data.
News organization ProPublica reported as far back as 2016 that advertisers could target ads through Facebook based on people's self-reported jobs, even if the job was "Jew hater".
ProPublica later reported that it was able to buy discriminatory housing ads and slip them past Facebook's review process, despite the company's claims it was blocking such ads.
Since then, Facebook has undergone legal pressure over the issue from the National Fair Housing Alliance, the American Civil Liberties Union and the Communications Workers of America, among other groups and individuals.
The civil charge follows an investigation by HUD in August when it filed a formal complaint against Facebook for violating the Fair Housing Act by allowing landlords and home sellers to use its advertising platform to engage in housing discrimination.
The charge will be heard by a US law administrative judge who can award damages for harm caused by the discrimination, along with fines and injunctive and other equitable relief.
The Fair Housing Act prohibits discrimination in housing and related services, which includes online advertisements, based on race, color, national origin, religion, sex, disability, or familial status.
Facebook said it had been working with HUD on the issue and was surprised by the department's decision.