By the 19th century, Joan of Arc had become public property. Hers was a voice that spoke to the imagination of artists, musicians and writers; as a symbol she represented the differing needs of successive generations.

George Bernard Shaw does not seem to have considered adding to the literature about Joan until he was in his 50s. In 1913 he visited Orléans and saw the 15th-century sculptured head of St Maurice, traditionally believed by the inhabitants to have been modelled after Joan. "It is a wonderful face . . . the face of a born leader," he wrote. "I shall do a Joan play some day." He imagined it beginning with the "sweeping up of the cinders and orange peel after her martyrdom", and going on to Joan's arrival in heaven. "I should have God about to damn the English for their share in her betrayal," he added, "and Joan producing an end of burnt stick in arrest of Judgment." This, he went on to explain, was all that was left of the two sticks made into a cross that an English soldier had given her when she went to the stake - a soldier who represented "the common people of England".

The epilogue to the actual play Shaw was to write 10 years later - a sort of bedroom cabaret which takes place during the king of France's dream - has some affinities with Shaw's original fantasy and features a "saint from hell" in the character of that redeemed English soldier. But of more significance, I think, is the change of surroundings Shaw provides for his "masterful girl soldier" following the first world war, and the different task he assigns her. The play he wrote in 1923 is his one foray into popular myth-making; while the epilogue that follows the six scenes of the play is a Shavian revue sketch which doesn't remove Joan into heaven so much as bring her from the 15th into the 20th century.

Saint Joan is a dialogue between the ancient and the modern worlds. We are shown Joan's posthumous rehabilitation as an example of a modern show trial, and her original court hearing as one of history's terrible state trials. "Joan was killed by the Inquisition," Shaw wrote in 1931. "The Inquisition is still with us." Perhaps he had a sense of what was soon to happen in Hitler's Germany. He believed that when a country fell too far behindhand with its political institutions you were likely to get dictatorships, and when you get dictatorships you will get secret tribunals dealing with sedition and political heresy - like the Inquisition.

In Shaw's view Joan was, like Jesus, an agent for change - change within the established church. When Cauchon, the Bishop of Beauvais, cries out: "Must then a Christ perish in torment in every age to save those who have no imagination?" this connection is made plain, and Joan herself endorses it when she tells the court: "I am His Child, and you are not fit that I should live among you." So Saint Joan becomes Shaw's Passion play and represents Joan's life as another coming of Christ to our world. "Joan's heresies and blasphemies are not heresies and blasphemies to us," he wrote to a friend: "We sympathise with them. And she defends herself splendidly."

Joan's religious fanaticism, reaching us through the perspective of 500 years and then filtered through Shaw's imagination, becomes the protest of a plain-spoken individual conscience. "What other judgment can I judge by but my own?" she asks. Shaw presents her to us as an evolutionary force all of whose miracles, though capable of natural explanation, are allowed to trail as legends in the wake of her miraculous personality.

It seemed to many audiences of this play that Joan's final miracle had been the transformation of Shaw himself. "She was the only woman who ever managed to wipe the smirk from Shaw's face," commented the writer Bernard Levin more than 50 years after the first performance. There was certainly a great urgency in Shaw's writing. He worked fast, filled with relief at lifting himself free from the postwar horror of his own times and entering a previous century to fight another war, the hundred years' war in France, against English imperialism. In the staging of this 15th-century campaign he translated his own assertion of style into Joan's inspired efficiency of action. Shaw reveals her as an undiscovered modern leader, the warrior-saint whom he had thought of dramatising through Cromwell or the prophet "Mahomet". "It is a stupendous play," the actress Sybil Thorndike wrote to him, "& [it] says all the things the world needs to hear at the moment." That, I believe, is still unfortunately true.

Though Thorndike created the role in this country in 1924 and was the theatrical model Shaw had in mind when writing the play, a more surprising actor played Joan's contemporary equivalent. This was the impressive and eccentric Mary Hankinson - "Hanky" as she was called - stalwart of the Fabian Society. She was famous among young Fabian men and women - famous for organising their summer schools, captaining their cricket teams, drilling their country dancers and policing their morals. One of the most vivid photographs of her shows her teaching Shaw to waltz backwards - he so thin and tall, she so short and square-shaped. She was said to be the only woman who taught him anything - though this was said of many women. As one young Fabian put it, there was "no panky with Hanky", for she seemed entirely sexless, pouring her energies into gymnastics and flute-playing and sharing her domestic life with her friend Ethel Moor. But Shaw had witnessed how she quelled a quite violent Fabian uprising against her demanding programme at one of these summer schools, and he recognised her remarkable abilities in this small but intense world. When Saint Joan was published, he presented her with a copy inscribed: "To Mary Hankinson, the only woman I know who does not believe she was the model for Joan, and also the only woman who actually was." This was a Shavian joke of course, but like all his jokes it contained an ingredient of truth. Nevertheless it brought down on his head the judgment of TS Eliot who accused him of having created "perhaps the greatest sacrilege of all Joans" by turning her into "a great middle-class reformer [whose] place is little higher than Mrs Pankhurst's". Shaw, I think, would have accepted this criticism to an extent - indeed he almost did so when, delivering a radio talk at the beginning of the 1930s, he stated that although no modern feminist was exactly like Joan, "I believe every one of them did regard herself, in a measure, [as] repeating the experiences of St Joan. St Joan inspired that movement. If you read Mrs Pankhurst, you will understand a great deal more about the psychology of Joan."

Like Shakespeare, Saint Joan has become many people's autobiographical reflections. Shaw's Joan is the complete outsider who feels most lonely when she is in the company of those who voice the opinions of the day. Her own timeless voices echo her unworldliness and establish her kinship with the playwright who felt a stranger on this planet and at ease only with the mighty dead.

He had called Hankinson "the only woman" whom he used among his contemporaries to build up the figure of Joan. But he did also use a man in that way. This was the legendary TE Lawrence.

Lawrence's irregular career exercised Shaw's imagination. Lady Gregory, when she visited Shaw in May 1923, recorded that the two people most on his mind were Joan of Arc and Lawrence of Arabia. To some extent Lawrence's Seven Pillars of Wisdom may be read as a cross-referring work to Saint Joan - the two chronicles providing a parallel between the saintly Maid and the ascetic Prince, both unconventional military leaders brought down by politicians of their day. As a peacetime man-of-letters who became a man-of-action in war, Lawrence provided a living connection that helped Shaw to bring his heroine "close to the present day".

"Mortal eyes cannot distinguish the saint from the heretic," warns Bishop Cauchon in the epilogue to this play. Shaw's drama puts the case for toleration - it is Joan's judges, the priests of the church and the princes of the world, who are on trial here. From the perspective of history it may be easy to see that Joan is inspired and that the other simple fanatic in the play, the English Chaplin de Stogumber, who throws himself into Joan's chair after her burning, is comically uninspired. But there exists a more sophisticated fanatic in the Inquisitor, who gives us an eloquent warning of where the toleration of fanaticism may lead - a warning that resonates throughout our times, and not only in the Middle East. The Inquisitor's words, with their denunciation of Joan's masculine dress, are a fearful condemnation of change - all change. And of course change can be for the worse as well as for the better. But changes in fashion, such as so-called masculine dress, exhibit how easily the unorthodoxy of one time becomes the convention of another - a point dramatically made in the epilogue at the appearance of a clerical-looking gentleman wearing "a black frock-coat and trousers, and tall hat, in the fashion of the year 1920". The Inquisitor's court has, by implication, reduced justice to the dictatorship of fashion - our own fashion for skeletal bodies for example.

But Saint Joan is a tragedy without villains, for everyone, in some way or another, believes he or she is acting for the good. The tragedy lies in human nature itself, which involves us all.

The epilogue gives Shaw the chance to step forward and talk the play over with you, the audience. What he tells us is that we too would burn Joan at the stake if we got the chance. It is a sombre message, and Shaw has been attacked for it. For this, out of more than 50 plays, is his only tragedy.

But, though always controversial (as it should be), Saint Joan has had many admirers - above all, perhaps, Shaw's fellow dramatist Pirandello. "In none of Shaw's work that I can think of have considerations of art been so thoroughly respected as in Saint Joan," Pirandello wrote on seeing the premiere in New York. "There is a truly great poet in Shaw".

"Woe unto me when all men praise me!" exclaims Joan. Shaw greeted his own popularity with similar scepticism. He had set out in his play to rescue Joan from sentimental posthumous canonisation and restore her original heresy in all its strength - only to find it was to lead to his own canonisation with the Nobel prize for literature. "The Nobel prize has been a hideous calamity for me," he wrote. "It was really almost as bad as my 70th birthday". He was told, however, that if he refused the prize of £7,000, the money would mysteriously disappear into Scandinavian bureaucracy. So he formally accepted it and used all the money to create a foundation for the translation of Swedish works into English (beginning with Strindberg). That foundation still exists today.

When news of him having given away such a large sum of money became known, he was besieged by people begging him to pay off their mortgages, adopt their children, or publish their masterpieces. To deal with this, he began practising what he called a complicated facial expression, which combined universal benevolence with a savage determination to rescue no one from financial ruin. At the age of 70 he was, it appeared, the most famous author in the world. "Such steps towards Mr Shaw's canonisation are being made," one journalist protested, "that people are forgetting that he was formerly always described as Mephistophelian". But there was no escaping the fact that, as Shaw wrote to Edith Sitwell, "I am in the very odour of sanctity after St Joan."

· Saint Joan is at the National Theatre, London. Michael Holroyd will be at the Olivier Theatre on July 24 to discuss the play and how it relates to Shaw's other work. Box office: 020 7452 3000.