The Illinois Supreme Court ruled Emanuel could run Thursday, less than 30 days before Election Day.
The candidate said he was feeling better.
"I'm happy that after all this effort we now have a conclusion so that voters can make the decision on who'll be the mayor, and they will now make the decision which is where this choice has always existed," Emanuel said.
After the state's top court released its opinion, Emanuel was out shaking hands with voters.
He told his wife that the court unanimously ruled in his favor and he also took a call from his former boss, Pres. Barack Obama, congratulating him.
City law requires that mayoral candidates must reside in Chicago for at least one year before the election, and Emanuel did not move back to Chicago from Washington until September. He had been leasing his permanent home in Lakeview to another family.
In its opinion, the Illinois Supreme Court made it very clear that the objectors in the case failed to prove that Emanuel ever formed an intention to terminate his residence in Chicago or to establish residence elsewhere. They cited that Emanuel told friends that he only intended to serve as the president's chief-of-staff for no more than two years before returning Chicago.
Emanuel also continued to vote in Chicago, pay property taxes here and left many personal items in his home on Hermitage.
"The law isn't quite as clear as you say it's been over the last 150 years. There's a little ambiguity, but they said specifically to the question, 'Do you lose your residency by leasing your home? No, you don't,'" election Attorney Michael Dorf said.
The Illinois Supreme Court ruled that the appellate court misinterpreted a 19th-century decision involving a judge who temporarily moved to Tennessee. That judge never sold any of his Illinois law books because he said he always intended to move back and he never sold his Illinois home.
The appellate court had concluded that residency should be based on where someone sleeps every night. However, the state's top court disagreed, ruling that the appellate court tossed out 150 years of law in favor of its own preferred standard. Read the full IL Supreme Court order
Although all of the Illinois Supreme Court justices agreed on the ruling, two judges wrote that the majority was too hard in its evaluation of the appellate court. They wrote that the court has not always ruled clearly on what is residency.
Emanuel's residency has been an issue since his intention to run was first acknowledged. He took the stand in a several day hearing in front the Chicago Board of Elections, which recommended he was qualified to run. The Circuit Court upheld the election board's opinion, but the Illinois Court of Appeals overturned on Monday. Emanuel then went to the High Court.
The residency issues and ensuing court battles led to the re-formatting of ballots -- which were printed with and without Emanuel's name -- in the February 22 election. On Tuesday, the Illinois Supreme Court ordered Emanuel's name back on the ballot until a ruling was handed down, the presses were stopped, 300,000 ballots without his name were tossed -- and his name was added once again.