Crowds thronged the Daley Center municipal building to catch a glimpse of the 44th US president.
There was no official explanation for his dismissal, but it is not uncommon for people called to perform jury service not to be assigned a case. Mr Obama arrived at court on Wednesday morning and left around midday.
The former president, who was once a law professor, has a house in Chicago.
Each potential juror is paid about $17.20 (£13.11) from the county.
News helicopters filmed Mr Obama’s motorcade as it moved from his home in the Kenwood neighborhood to an indoor car park downtown.
Wearing a jacket but no tie, Mr Obama took a lift to the 17th floor, where he was met by other jurors as well as journalists, court staffers and lawyers.
He was not there for long. Mr Obama was randomly selected for dismissal and was told his services were not required by Cook County Chief Judge Timothy Evan.
Before leaving Mr Obama thanked everyone who turned up for being willing to serve on a jury.
Some of his fellow Americans brought copies of Mr Obama’s books for him to sign. Others, including courthouse staff, just wanted a photo.
One potential juror told a local newspaper she felt like a “piece of melting butter” as she shook the former president’s hand.