CHICAGO — The young law professor stood apart in too many ways to count. At a school where economic analysis was all the rage, he taught rights, race and gender. Other faculty members dreamed of tenured positions; he turned them down. While most colleagues published by the pound, he never completed a single work of legal scholarship.

At a formal institution, Barack Obama was a loose presence, joking with students about their romantic prospects, using first names, referring to case law one moment and “The Godfather” the next. He was also an enigmatic one, often leaving fellow faculty members guessing about his precise views.

Mr. Obama, now the junior senator from Illinois and the presumptive Democratic presidential nominee, spent 12 years at the University of Chicago Law School. Most aspiring politicians do not dwell in the halls of academia, and few promising young legal thinkers toil in state legislatures. Mr. Obama planted a foot in each, splitting his weeks between an elite law school and the far less rarefied atmosphere of the Illinois Senate.

Before he outraised every other presidential primary candidate in American history, Mr. Obama marched students through the thickets of campaign finance law. Before he helped redraw his own State Senate district, making it whiter and wealthier, he taught districting as a racially fraught study in how power is secured. And before he posed what may be the ultimate test of racial equality — whether Americans will elect a black president — he led students through African-Americans’ long fight for equal status.