The university law review is an American phenomenon that has no parallel in Britain's lazier and less academic law schools: the notion of an elite group of students determining, by the juristic contributions they choose to solicit, the focus of contemporary legal thinking would cause apoplexy in Oxbridge common rooms. But in the US, law reviews are important in shaping the law, and Harvard is the most important of all. Hence the newsworthiness of Obama's election. Never before had there been a black editor-in-chief. "The fact that I've been elected shows a lot of progress," he said at a news conference. "But you have to remember that for every one of me there are hundreds of thousands of black students with at least equal talent who don't get a chance" because of poverty and family drug environments.

It was a worthy beginning and earned him an affectionate impersonation in that year's Harvard Law Revue. ("In Chicago I discovered I was black, and I have remained so ever since"). The 1990-91 legal term was an unsettling and unsettled time. Justice William Brennan, architect of Supreme Court activism (for example, The New York Times v Sullivan) had just retired, and Obama's volume begins with a tribute to him from Thurgood Marshall, the court's first black judge. William Rehnquist now held the reins, and Reagan and George snr appointees were in the majority: the candle of liberal jurisprudence, burning bright in classrooms inspired by the philosophy of Ronald Dworkin, was beginning to tremble. Volume 104 is full of civil liberty issues (Obama had been an editor of the previous year's Civil Liberties Review) and full of apprehension lest Dworkin's moral theories would cut no ice with the likes of Justice Scalia. The first major article (solicited, it was noted with surprise, from a non-ivy league professor) analysed the philosophy of Vaclav Havel and argued that his "individual responsibility" approach might be better suited to protecting freedom than Dworkin's appeals to individual rights. Volume 104 exhibits a refreshing interest in foreign cases (some Republican justices regard the citation of British court decisions as tantamount to treason) and there is a contrast between Stephen Sedley's views on the need to censor hate speech and the ACLU's support for the right of racist utterance.

Barack Obama leaves no byline in this volume, but as president he would have been responsible for selecting the topic of the major student disquisition: a 180-page analysis of the need for new law to protect the environment. Introduced with quotes from Chekov, U Thant and the Grateful Dead, this closely argued segment appears prescient today: it was produced long before climate change became topical, and its advocacy of "green helmets" and extra-territorial law enforcement against corporate polluters is more relevant than ever. It is tempting to detect the young Obama's hand in a few of the many unsigned articles and book reviews. There is a scathing dismissal of a book by Roy Grutman, a great courtroom advocate ("money is what makes his legal world go round") reminiscent of Obama's later comments that law "is a sort of glorified accounting that seems to regulate the affairs of those who have power". I strongly suspect his contribution to the last and best article in Volume 104, titled Talking of Unconscionable Niggers.

This is an acidic review of a biography of Frederick Douglass, the slave who became a formidable orator for abolition and later a respected public servant (the title is a quoted reaction to Douglass's modest request to be paid for his services). The review notes how most white abolitionists (including Lincoln) were opposed to equal rights for freed slaves, and severely criticises the author (a white historian) for failing to notice black women. This is not an admission that Obama, shortly to marry Michelle (who had graduated from Harvard before him) could readily forgive. Obama himself graduated Magna cum Laude with the legal world at his feet. He could have taken a highly paid job at a prestigious law firm, or a year's clerkship with a Supreme Court judge followed by an even more highly paid job. Instead he returned to community work for a small firm in Chicago that specialised in housing, welfare and employment and that billed him out at a modest $167 an hour. For all his rhetorical genius he never tried a case, preferring the solicitor's work of researching briefs and preparing witness statements. His clients were whistle-blowers and NGOs anxious to use the law to assist the registration of voters who were poor and black and mainly Democrat. Obama was elected to the Illinois Senate, although he continued to lecture for 12 years on constitutional law as a visiting professor in Chicago. By all accounts, especially those of his students, he was an outstanding teacher. There is one abiding mystery about Obama's legal career. Although (as his books attest) he is a fine writer, he never put his name to any article, anywhere. It was a time when the very ambitious had become very cautious: Robert Bork had been denied Supreme Court confirmation on the strength (in fact, the weakness) of his earlier writings, and the mysterious David Souter passed muster only because he had written nothing that Democrats on the Senate's judiciary committee could sink their teeth into (to Republican fury, he turned out to be a closet liberal).

Perhaps young Barack decided to leave no hostages to fortune in a career trajectory that might take him to the Supreme Court, or to the White House. Or perhaps he was too busy with his humble work in and for poor communities than to bother about reshaping a legal system that he had come to believe would inevitably serve the powerful. Ironically it is that system which is most at stake in this election. George Bush leaves a bloc of four dyed-in-the-wool conservatives seated for many years yet on the nine-judge Supreme Court. Three of the remaining moderates (Justices Stevens, Ginsberg and Souter) are likely to leave in the next few years.

"Gentleman John" McCain has promised to appoint strict constructionists, judges who will find no constitutional bar to executing juveniles, or limiting abortions or abolishing habeas corpus. The fate of liberal jurisprudence hangs once again in the balance as it did, in 1990, for the president of the Harvard Law Review. Just how vital - and how insecure - that balance is, was demonstrated by the 5-4 US Supreme Court decision this month to strike down as unconstitutional the Bush Congress law depriving Guantanamo Bay inmates of the right to habeas corpus. The moderates in the majority drew upon Anglo-American legal history, from Magna Carta onwards, to insist that "the great writ" could not be suspended by the government on the pretence that Guantanamo is a foreign country. The minority, led by Bush's chief justice, mean-mindedly accepted this pretence and exhibited a cruel insouciance over the fact that the inmates had already been detained without trial for six years. Obama, out on the stump, immediately and courageously went into battle for the principled, but unpopular, majority decision.

"… you remember during the Nuremberg trials, part of what made us different was even after these Nazis had performed atrocities that no-one had ever seen before, we still gave them a day in court. And that taught the entire world about who we are, but also the basic principles of rule of law. Now the Supreme Court upheld that principle yesterday." It is sobering to think that unless Obama is elected it is unlikely that the Supreme Court, its balance changed by just one more Republican appointment, will uphold that principle again, at least for the next decade.

Obama's legal career never took off, for all its historic promise at Harvard. He turned his back on the glamour of trial attorneyship and the mega bucks of a prestige partnership, preferring to help house the poor. That may have been the result of careful calculation, as the quickest way to a political career. Or it may simply be that Barack Obama, despite being a lawyer, is in fact a good person. Geoffrey Robertson, QC is author of The Justice Game (Vintage), and a member of the UN's Internal Justice Council.