Leinenweber apparently agreed, saying in his ruling that Sessions had attempted an "unprecedented seizure of power" in imposing such conditions on law enforcement grants, The Chicago Sun-Times reported.
The U.S. Department of Justice will not be permitted to withhold grant funds from cities that refuse to assist federal immigration officials to pursue suspected undocumented immigrants, a judge ruled Friday.
The ruling is another blow to Mr. Sessions, a longtime champion of tougher immigration laws. Trump later adopted a softer tone toward the 800,000 immigrants protected by DACA, telling them not to worry about being deported.
Leinenweber, in his 41-page ruling, said that the city could suffer "irreparable harm".
The federal government provides this money through the Edward Byrne Memorial Justice Assistance Grant, which aims to reduce gun violence, equip officers with body cameras, improve mental health services, and reduce unnecessary incarceration.
The ruling is the latest in the back-and-forth between the Trump administration and cities and states challenging his immigration actions. At least seven cities and counties, including Seattle and San Francisco, as well as the state of California, are refusing to cooperate with the new federal rules.
With the White House seeking to curb immigration across the nation, cities have found themselves on the front lines of a dispute over public safety. Sessions wanted local authorities to detain people in this country illegally for 48 hours, so immigration agents could apprehend them, and allow agents into local jails.
Chicago Mayor Rahm Emanuel hailed Friday's decision at a City Hall news conference as "an affirmation of the rule of law".
Leinenweber blocked the Justice Department from enforcing the new measures, which it introduced earlier this summer, meaning cities applying for the funds this year will not have to comply. "This is astounding given the unprecedented crime surge in Chicago, with the number of murders in 2016 surpassing both NY and Los Angeles combined".
The judge's opinion temporarily blocks the DOJ program while the lawsuit plays out in court and claims Sessions doesn't have the authority to implement the policy. Nor would he say if he thought that the administration would find another way to punish the city, such as pulling the 20 agents with the Bureau of Alcohol, Tobacco, Firearms and Explosives who were recently assigned to the city as part of a new initiative against gun violence.
"Once such trust is lost, it can not be repaired through an award of money damages, making it the type of harm that is especially hard to rectify", Leinenweber wrote.
But Chicago took the federal government to court and won an injunction.