The city's Illegal Immigration Relief Act sought to impose fines on landlords who rent to illegal immigrants and deny business permits to companies that give them jobs. Another measure would have required tenants to register with City Hall and pay for a rental permit.
U.S. District Judge James Munley voided the law Thursday based on testimony from a nine-day trial held in March.
"This decision should be a blaring red stoplight for local officials thinking of copying Hazleton's misguided and unconstitutional law," said Witold J. Walczak, legal director of the American Civil Liberties Union of Pennsylvania, which represented the plaintiffs.
The city will almost certainly appeal.
Hazleton's Republican mayor pushed for the strict laws last summer after two illegal immigrants were charged in a fatal shooting. Mayor Lou Barletta argued that illegal immigrants brought drugs, crime and gangs to the city of more than 30,000, overwhelming police and schools.
"When you start seeing serious crimes being committed, very violent crimes being committed and time and time again those involved are illegal aliens, it doesn't take a brain surgeon to figure out that you're experiencing a problem here that you've never had before, nor do you have the resources to deal with it," Hazleton Mayor Lou Barletta told 60 Minutes correspondent Steve Kroft in November.
Immigrant groups sued, saying the laws usurp the federal government's exclusive power to regulate immigration, deprive residents of their constitutional rights to equal protection, and violate state and federal housing law.
In a 206-page opinion, Munley said the act was pre-empted by federal law and would violate due process rights.
"Whatever frustrations ... the city of Hazleton may feel about the current state of federal immigration enforcement, the nature of the political system in the United States prohibits the city from enacting ordinances that disrupt a carefully drawn federal statutory scheme," Munley wrote.
"Even if federal law did not conflict with Hazleton's measures, the city could not enact an ordinance that violates rights the Constitution guarantees to every person in the United States, whether legal resident or not," he added.
Hispanic immigrants began settling in Hazleton in large numbers several years ago, lured from New York, Philadelphia and other cities by cheap housing, low crime and the availability of work in nearby factories and farms.
The city, 80 miles northwest of Philadelphia, estimates its population increased by more than 10,000 between 2000 and 2006. Testimony during the trial put the number of illegal immigrants at between 1,500 and 3,400.
Hazleton's act was copied by dozens of municipalities around the nation that believe the federal government hasn't done enough to stop illegal immigration. Munley's ruling does not affect those measures.