Abner J. Mikva in 1995 (Ray Lustig/The Washington Post)

Abner J. Mikva, a liberal titan of law and politics who served as a U.S. congressman from Illinois, a federal judge in Washington and White House counsel to President Bill Clinton, and who was an early mentor to future president Barack Obama, died July 4 at a hospice center in Chicago. He was 90.

The cause was complications from bladder cancer, said a son-in-law, Steven Cohen.

Once described by the New York Times as “the Zelig of the American legal scene,” Mr. Mikva held high office in all three branches of government.

He wielded influence beyond his official capacities, offering judicial clerkships to future Supreme Court Justice Elena Kagan, who accepted, and to Obama, then a recent Harvard Law School graduate, who declined and opted instead to return to Chicago, where he eventually launched his political career.

“This guy really has brass,” Mr. Mikva recalled thinking.

Abner Mikva in 2008. (Tim Boyle/Bloomberg News)

Described as a father figure to Obama, Mr. Mikva connected the young politician with other power brokers who would help pave his way in public life.

In 2014, Obama awarded Mr. Mikva the Presidential Medal of Freedom, the country’s highest civilian honor, recognizing him as “one of the greatest jurists of his time,” who “helped shape the national debate on some of the most challenging issues of the day.”

Mr. Mikva traced his passion for politics to an encounter with the Chicago Democratic machine in 1948, a moment that became political lore. Energized by the liberal campaigns of future senator Paul H. Douglas and future governor Adlai E. Stevenson II, Mr. Mikva, then a law student, showed up at the 8th Ward Regular Democratic Organization headquarters.

“I came in and said I wanted to help,” he recalled in an oral history with political historian Milton Rakove. “Dead silence. ‘Who sent you?’ the committeeman said. I said, ‘Nobody.’ He said, ‘We don’t want nobody nobody sent.’ Then he said, ‘We ain’t got no jobs.’ I said, ‘I don’t want a job.’ He said, ‘We don’t want nobody that don’t want a job. Where are you from, anyway?’ I said, ‘University of Chicago.’ He said, ‘We don’t want nobody from the University of Chicago.’ ”

Mr. Mikva, who clerked for Supreme Court Justice Sherman Minton, soon threw himself into Chicago politics and positioned himself as a liberal, independent-minded reformer against one of the most entrenched party organizations in modern American history.

In 1956, he won election to the Illinois House of Representatives and proved a shrewd and collaborative politician at the statehouse, working effectively on social-reform bills dealing with crime, civil rights, health care and other issues.

Twelve years later, he captured a seat in the U.S. House of Representatives after dislodging an 86-year-old incumbent Democrat, Barratt O’Hara, from his district on the South Side of Chicago.

Mr. Mikva became a standard-bearer for liberal causes, supporting gun control and abortion rights and opposing the Vietnam War and capital punishment, and was a near-constant thorn in the side of Chicago Mayor Richard J. Daley. Daley, who dominated the city’s Democratic machine for years, could not countenance the upstart legislator and referred to him, perhaps not unintentionally, as “Mifka.”

In a move attributed to Daley’s organization, Mr. Mikva’s district was redefined during congressional reapportionment. He ran for a seat on the city’s North Shore in 1972, lost, and sat out of Congress for a term, then tried again in 1974 and won. He remained on Capitol Hill until President Jimmy Carter (D) nominated him in 1979 for the U.S. Court of Appeals for the District of Columbia Circuit.

That court, with jurisdiction over federal agencies, is often described as the most important judicial body in the United States after the Supreme Court. Mr. Mikva overcame the opposition of the National Rifle Association in his Senate confirmation proceedings and became known on the bench for the liberal principles that endeared him to the like-minded but at times angered conservatives.

In 1993, Mr. Mikva, then the court’s chief judge, helped decide a high-profile case in which the court ordered the commission of a midshipman who had been expelled from the U.S. Naval Academy at Annapolis because he was gay.

“The Constitution does not allow Government to subordinate a class of persons simply because others do not like them,” he wrote in the court’s opinion.

The decision, which challenged the Clinton administration’s “don’t ask, don’t tell” policy on gays in the military, was reversed on appeal the following year. In 2011, “don’t ask, don’t tell” was repealed, allowing gays and lesbians to serve openly in uniform.

Although he was generally regarded as an activist judge, Mr. Mikva had the respect of colleagues with differing worldviews, including fellow appeals court judge Robert H. Bork, the conservative jurist whose failed Supreme Court nomination in 1987 set off an ideological wildfire.

Mr. Mikva cautioned for judicial restraint in certain circumstances. He said that he supported the result of Roe v. Wade, the landmark 1973 Supreme Court decision legalizing abortion, but said he wished “the court had stayed its hand and allowed the political process to continue.”

“We would have legislated the effect of Roe v. Wade in most states,” he said in a 1999 oral history for the University of California at Berkeley, “and we wouldn’t have had to pay the political price we’ve had to pay for it being a court decision. The people who are angry at that court are angry beyond measure. As far as they are concerned, the whole system is rotten because they’ve lost their opportunity to slug it out.”

Mr. Mikva was frequently mentioned as a contender for a Supreme Court nomination, although he quipped that he was “too old, too white, too male and too liberal” to make the cut.

He left the appeals court in 1994 when Clinton, midway through his first term, offered him the post of White House counsel. Mr. Mikva was the third person to hold the position under Clinton, after Bernard Nussbaum and Lloyd N. Cutler.

Mr. Mikva represented Clinton during controversies including a congressional inquiry into the FBI’s 1993 raid on cult leader David Koresh’s Branch Davidian compound near Waco, Tex. But few issues consumed more of Mr. Mikva’s time than the Whitewater probe stemming from a failed Arkansas land deal involving Clinton and his wife, Hillary Clinton.

Kenneth W. Starr, the independent counsel appointed to investigate the matter, had previously served with Mr. Mikva on the appeals court. During their dealings with the president, Mr. Mikva once told the Times, Starr was discreet and respectful. He questioned the Clintons upstairs in the White House residence on a Saturday, rather than in a more public setting, and he used a back entrance to access the residence. There were no leaks to the media.

“I realize it was not done for this president,” Mr. Mikva recalled telling Starr at one point. “I appreciate your concern for the presidency.”

Mr. Mikva left the White House in 1995 and became a professor at the University of Chicago law school. He said that he was disappointed by the conduct of the investigation as it became increasingly rancorous and as it grew to encompass Clinton’s personal life, including his affair with White House intern Monica S. Lewinsky.

“I was shocked when Mrs. Clinton was called before the grand jury and he made her go to the courthouse” in 1996, Mr. Mikva told the Times. “He could have taken her testimony under oath at the White House. He knew there was no back stairway at that courthouse, that she’d have to walk right in front of the barrage of cameras. Ken knew that courthouse better than anyone.”

Abner Joseph Mikva — the surname is the Hebrew word for a ritual bath — was born in Milwaukee on Jan. 21, 1926. His parents, immigrants from the shtetls of Eastern Europe, spoke mainly Yiddish and encouraged him in his education. His father became a life insurance agent and lost his job in the Depression, and the family relied on relief for a period.

After Army Air Forces service during World War II, Mr. Mikva graduated in 1951 from the University of Chicago law school, where he was editor of the law review. During his political rise, he worked as a labor lawyer, including with the firm of Arthur Goldberg, who later became a labor secretary, Supreme Court justice and U.S. representative to the United Nations.

In 1948, Mr. Mikva married the former Zorita “Zoe” Wise. In 1997, they helped found the Mikva Challenge, a Chicago-based nonprofit organization that aims to engage young people in civic life. Besides his wife, survivors include three daughters, Mary Mikva, Laurie Mikva and Rachel Mikva Rosenberg, all of Chicago; and seven grandchildren.

Although Mr. Mikva did not ascend to the Supreme Court in real life, he did join the bench in Hollywood. In “Dave” (1993), the romantic comedy starring Kevin Kline as a stand-in commander in chief, Mr. Mikva played the chief justice who administers the presidential oath of office.