The Old Bailey has, for centuries, provided the ultimate arena for challenging the state. But of all its trials – for murder and mayhem, for treason and sedition – none has had such profound social and political consequences as the trial in 1960 of Penguin Books for publishing Lady Chatterley's Lover. The verdict was a crucial step towards the freedom of the written word, at least for works of literary merit (works of no literary merit were not safe until the trial of Oz in 1971, and works of demerit had to await the acquittal of Inside Linda Lovelace in 1977). But the Chatterley trial marked the first symbolic moral battle between the humanitarian force of English liberalism and the dead hand of those described by George Orwell as "the striped-trousered ones who rule", a battle joined in the 1960s on issues crucial to human rights, including the legalisation of homosexuality and abortion, abolition of the death penalty and of theatre censorship, and reform of the divorce laws. The acquittal of Lady Chatterley was the first sign that victory was achievable, and with the guidance of the book's great defender, Gerald Gardiner QC (Labour lord chancellor 1964–70), victory was, in due course, achieved.

There is a myth that freedom of speech has been safely protected in England by the jury. This is almost precisely the opposite of the truth. Old Bailey juries (comprised until 1972 solely of property owners) usually did what they were told by judges, and convicted. Until 1959, the publisher of a book that contained any "purple passage" that might have a "tendency to deprave and corrupt those whose minds are open to such immoral influences" was liable to imprisonment. Literary standards were set at what was deemed acceptable reading for 14-year-old schoolgirls – whether or not they could, or would want to, read it. Merit was no defence: in 1928 Radclyffe Hall's The Well of Loneliness was destroyed by a magistrate who realised to his horror that one line in the novel ("and that night they were not divided") meant that two female characters had been to bed together. He said this would "induce thoughts of a most impure character and would glorify the horrible tendency of lesbianism"; the prosecution had Rudyard Kipling attend the court, in case the magistrate needed a literary expert to persuade him to "keep the Empire pure". Censorship of sexual references in literature was pervasive in England in the 1930s (there was a brief respite for James Joyce's Ulysses when a sumptuously bound copy was found among the papers of a deceased lord chancellor). In the 1950s police seized copies of the Kinsey report and prosecuted four major publishers for works of modern fiction – three were convicted. In this period, books by Henry Miller, Lawrence Durrell, Cyril Connolly and others were available only to those English readers who could afford to travel to Paris to purchase them.

In 1959, persuaded by the Society of Authors, parliament passed a new Obscene Publications Act with a preamble that promised "to provide for the protection of literature and to strengthen the law concerning pornography". The distinction was to prove elusive, certainly to the attorney general, Reginald Manningham-Buller. In August 1960 he read the first four chapters of Lady Chatterley's Lover on the boat train to Southampton and wrote to the director of public prosecutions approving the prosecution of Penguin Books ("I hope you get a conviction"). The key factor in the decision to prosecute was that Penguin proposed to sell the book for 3/6; in other words, to put it within easy reach of women and the working classes. This, the DPP's files reveal, was what the upper-middle-class male lawyers and politicians of the time refused to tolerate.

The choice of Lady Chatterley as a test-case was inept, but it suited the anti-intellectual temper of the legal establishment and it would mean the defeat of an impeccably liberal cause. Besides, DH Lawrence had form. Back in 1915 all copies of The Rainbow had been seized by police and burned (as much for its anti-war message as for its openness about sex). In 1928, police threatened the publisher Martin Secker with prosecution unless it removed 13 pages from Pansies, a book of Lawrence's poems. The publisher complied, but sent all its unexpurgated copies abroad. The following year police raided an exhibition of Lawrence's paintings and seized every canvas on which they could descry any wisp of pubic hair. For the next 30 years British customs erected a cordon sanitaire to keep out smuggled copies of Lady Chatterley, which by this time was being published in France and Italy. So Lawrence was entrenched in prudish English minds as the filthy fifth columnist, an enemy much more dangerous than predictably dirty foreigners such as De Sade or Nabokov (whose banned Lolita would have been a more sensible target). With parochial arrogance, the prosecuting authorities ignored the New York court of appeal, which in 1959 had overturned a ban on Lady Chatterley because it was written with "a power and tenderness which was compelling" and which justified its use of four-letter Anglo-Saxon words.

Those words were a red rag to Manningham-Buller and the "grey elderly ones" (as Lawrence had described his censors), a breach of the etiquette and decorum relied on to cover up unpleasant truths. In 1960, in the interests of keeping wives dutiful and servants touching their forelocks, Lady Constance Chatterley's affair with a gamekeeper was unmentionable. The prosecutors were complacent: they would have the judge on their side, and a jury comprised of people of property, predominantly male, middle aged, middle minded and middle class. And they had four-letter words galore: the prosecuting counsel's first request was that a clerk in the DPP's office should count them carefully. In his opening speech to the jury, he played them as if they were trump cards: "The word 'fuck' or 'fucking' appears no less than 30 times . . . 'Cunt' 14 times; 'balls' 13 times; 'shit' and 'arse' six times apiece; 'cock' four times; 'piss' three times, and so on."

But what the prosecution failed to comprehend was that the 1959 Act had wrought some important changes in the law. Although it retained a "tendency to deprave and corrupt" as the test of obscenity, books had now to be "taken as a whole" – that is, not judged solely on their purple passages – and only in respect of persons likely to read them; in other words, not 14-year-old schoolgirls, unless they were directed to that teenage market. Most importantly, section 4 of the Act provided that even if the jury found that the book tended to deprave and corrupt it could nonetheless acquit if persuaded that publication "is justified in the interests of science, literature, art and learning or any other object of general concern". The unsung hero of the trial, Penguin's solicitor, Michael Rubinstein, threw himself into the task of recruiting expert witnesses for the defence – not just professors of literature but famous novelists and unknown novelists, journalists, psychologists and even clerics.

After the case had been lost, the attorney general pretended that the Crown had disdained to match the defence "bishop for bishop and don for don", but this was a lie. In fact, the prosecution made desperate attempts to find anyone of distinction who might support a ban on Lawrence's novel. The DPP's first suggestion was to rely again on Kipling, until it was discovered that he had died in 1936. TS Eliot turned them down, as did FR Leavis (although he also refused to testify for the defence) and Helen Gardner, reader in English literature at Oxford, who told the DPP (as she was later to tell the jury) that the book was the work of a writer of genius and complete integrity. It is a measure of the narrowness of legal education in England in those days that this had simply not occurred to the lawyers in the DPP's office or to the team of Treasury Counsel, a pampered, old-Etonian set of barristers who conduct major prosecutions at the Old Bailey before their inevitable elevation to its judicial benches. Its leader, Mervyn Griffith-Jones, had no interest in literature: he was the incarnation of upper-middle-class morality, obsessed with the book's danger to social order. His famously asinine question about wives and servants was asked rhetorically and with utter sincerity.

Griffith-Jones's assumptions about society reflected his station in it, and as the trial developed he seemed more scandalised by adultery – especially with a servant – than by the four-letter words that had preoccupied him at the start. Those few witnesses he bothered to cross-examine were tackled on subjects he knew nothing about, and he tried to cover up his own confusion with gratuitous insults ("you are not at Leicester University at the moment"). Ignorant of the facts as well as the facts of life, Griffith-Jones failed even to recognise Lawrence's paean to anal sex. ("Not very easy, sometimes, not very easy, you know, to know what in fact he is driving at in that passage"). After the trial the warden of All Souls, John Sparrow, wrote an article in Encounter claiming that the jury would have convicted had the prosecution been able to identify which passage was being driven at, but he, too, did not understand the new law. Under the 1959 Act, purple passages, even on the subject of heterosexual buggery (still the "abominable crime"), no longer necessarily meant a guilty verdict. Jurors had to ask themselves the common-sense question of whether the publication as a whole would do any harm and, if so, whether its literary merit might redeem it.

The tactical superiority of the defence team was evident from the outset. In a daring move on the first day of the trial, Gardiner and Jeremy Hutchinson QC declined the judge's invitation to invoke the sexist law that allowed them to empanel an all-male jury in obscenity cases, and even used their right of challenge to add a third female juror. They realised the danger that an all-male jury might be over-protective towards women in their absence and they calculated that the prosecution's paternalism would alienate female jurors.

Gardiner's forensic performance, transcribed in CH Rolph's Penguin Special The Trial of Lady Chatterley, was a masterclass in modern barristering. He eschewed the histrionics of Old Bailey hacks like Marshall Hall ("look at her, gentleman of the jury. God never gave her a chance – won't you?"). Instead, he addressed the jury in powerful but straightforward language, respecting them but never condescending or playing obviously to their sympathy. He firmly indicated that they, not the judge, were responsible for the verdict. Had there been no jury, Justice Byrne would certainly have convicted.

Byrne directed the jury to consider whether the book "portrays the life of an immoral woman", to remember the meaning of "lawful marriage" in a Christian country and to reflect that "the gamekeeper, incidentally, had a wife also. Thus what the ultimate result there would be is a matter for you to consider."

Judges in 1960 regarded themselves, rather more than they do today, as the custodians of moral virtue. In performing this egregious function, they came to blur the distinction between literature and life. Their confusion was well represented by Lord Hailsham, in the parliamentary debate that followed the verdict: "Before I accepted as valid or valuable or even excusable the relationship between Lady Chatterley and Mellors, I should have liked to know what sort of parents they became to the child . . . I should have liked to see the kind of house they proposed to set up together; I should have liked to know how Mellors would have survived living on Connie's rentier income of £600 . . . and I should have liked to know whether they acquired a circle of friends, or, if not, how their relationship survived social isolation."

So far as Byrne and Hailsham and Griffith-Jones were concerned, the function of the modern novel was that laid down by Oscar Wilde's Miss Prism: "the good end happily, the bad end unhappily – that is what 'fiction' means." The acquittal was a victory for moral relativism and sexual tolerance, as well as for literary freedom.

No other jury verdict in British history has had such a deep social impact. Over the next three months Penguin sold 3m copies of the book – an example of what many years later was described as "the Spycatcher effect", by which the attempt to suppress a book through unsuccessful litigation serves only to promote huge sales. The jury – that iconic representative of democratic society – had given its imprimatur to ending the taboo on sexual discussion in art and entertainment. Within a few years the stifling censorship of the theatre by the lord chamberlain had been abolished, and a gritty realism emerged in British cinema and drama. (Saturday Night and Sunday Morning came out at the same time as the unexpurgated Lady Chatterley, and very soon Peter Finch was commenting on Glenda Jackson's "tired old tits" in Sunday Bloody Sunday and Ken Tynan said the first "fuck" on the BBC.) Homosexuality was decriminalised, abortions were available on reasonable demand, and in order to obtain a divorce it was unnecessary to prove that a spouse had committed the "matrimonial crime" of adultery. Judges no longer put on black caps to sentence prisoners to hang by the neck until dead.

In 1960, Sir Allen Lane took some risks and suffered a lot of personal abuse, although his lawyers adroitly arranged for the case to be brought against the company rather than its directors in person, so there was never any danger of a prison sentence. But he put his company in peril for a principle: "my idea was to produce a book that would sell at the price of 10 cigarettes". Books have increased in price even more than cigarettes over the past 50 years and caused a lot less harm. Indeed, the message of Lady Chatterley's Lover, half a century after the trial, is that literature in itself does no harm at all. The damage that gets attributed to books – and to plays and movies and cartoons – is caused by the actions of people who try to suppress them.

• This is a preview from tomorrow's Guardian Review. Also in tomorrow's Review: Martin Amis on Philip Larkin's women, an interview with Colm Toibin, Alasdair Gray's paintings, and Will Hutton on William Beveridge.

• Find out how to subscribe to the Guardian at a special rate