GENETICALLY programmed to be punctual, I arrive at the appointed hour in the lobby of Glasgow's Malmaison hotel to be greeted by Julian Barnes's wife, the literary agent Pat Kavanagh. She is about to take an evening stroll in the city. Julian, she says, will be down shortly. As we speak, he is watching the cricket. This news is imparted with the solemnity it deserves. Barnes, a well-known aficionado of sport, would, one imagines, die happy in the middle of ITV's coverage of the Tour de France.

It being the first day of the Ashes test, I steel myself for a long wait. In the event, Barnes arrives soon after. The news from Lords or wherever is glum. After a bright start England's batting order has collapsed. Again.

A man called Shane, who wears earrings, has apparently done the damage. We hold an impromptu minute's silence before finding a quiet room. Tea and biscuits are ordered and we settle down to discuss Barnes's brilliant new novel, Arthur & George.

He is in relaxed mode, dressed literary casual and looking considerably more youthful than a man on the cusp of 60. He is stopping overnight en route to Barra, where he will be staying with friends in what was once Compton Mackenzie's house. He is a walker, though not a Munro-bagger; hills being obstacles to be overcome only when they get in the way of going from A to B. "I like not seeing people, " he says, "that's one of the great things about walking."

Arthur & George is based on a true story set in the late-19th century, in which George Edalji, a half-Indian solicitor, is jailed for three years for what was known at the time as The Great Wyrley Outrages, specifically the mutilation of horses. When Arthur Conan Doyle, the creator of Sherlock Holmes, read about the case he wrote a pamphlet accusing the police of pursuing the wrong man.

According to Doyle, Edalji was the victim of a miscarriage of justice. He identified the real culprit as a sociopathic waster from Walsall.

Biographies of Doyle give short shrift to the cause celebre. In his autobiography, however, Doyle devoted a chapter to what he described variously as "a wretched decision", "a blot on the record of English justice" and "a travesty". It was his opportunity to play Sherlock Holmes. But how did Barnes come across the story?

For a long time, he says, he'd been wanting to write about the forgotten black population in London in the 18th and 19th centuries. He was making no real progress until he read a long essay on the Dreyfus case, in which an officer of Jewish descent in the French artillery was accused and convicted of having betrayed military secrets.

Sentenced to life imprisonment in 1894, he was finally pardoned in 1906 with the help of various literary luminaries, including Emile Zola who wrote the letter J'Accuse. The essay was by the late Duncan Johnson, a Francophile like Barnes. He mentioned the Edalji case and asked, "How come this case has been forgotten? You might reply that the French case was about treason and this case was about animal mutilation. My experience is that the British are more shocked by animal mutilation than by treason." Barnes laughs. Johnson, he suggests, had a point.

Arthur & George tells the story of both men in tandem, their lives crossing fleetingly. The pace is as slow as an English summer but compelling and supercharged with meaning. Barnes measures his words by the carat. In an introduction to the Everyman edition of Edith Wharton's The Reef he noted: "Novels consist of words, evenly and democratically spaced; though some may acquire higher social rank by italicisation or capitalisation. In most novels, this democracy spreads wider: every word is as important as every other word. In better novels, certain words have a higher specific gravity than other words."

Arthur & George is of the superior class of novel, in which two men from very different backgrounds strive to uphold common values in an alien country whose reputation is founded on the idea of fair play, equality and justice. When Doyle, born in Edinburgh, finally meets George, of mixed race, he tells him: "You and I, George, you and I, we are unofficial Englishmen." Both are eager, almost over-eager, to assimilate in their adopted country.

The novel may be set 100 years ago but the contemporary resonances are unmissable. It is a novel quite different to others in Barnes's oeuvre, as unlike Metroland, his debut, as was Flaubert's Parrot. His publisher says it "will surely find him an entirely new audience". "I know, " he winces. "I sort of feel awkward about that because I liked my old audience." Who knows, he may become big in Bulgaria. "They like me already in Bulgaria, " he counters. So much so that his novel The Porcupine was published in Sofia before it was released in London. In fact, it made the national news. "It wouldn't happen with Huw Edwards, would it?"

One concedes that it would not. In Britain, the only novels which make front page news are by JK Rowling or Salman Rushdie. In one of his essay collections, Something To Declare, Barnes noted that while British Airways would not allow Rushdie on board its planes with the fatwa hanging over him, Air France said he would not be refused. "In public life, " he wrote, "the French are just as hypocritical as we are; the difference would seem to be that their hypocrisy pays lip-service to idealism, whereas ours pays lip-service to pragmatism."

Which brings us inevitably to the current parlous state of affairs. Like many writers, Barnes was asked to contribute an instant reaction to the London bombings. He was reluctant. "Within an hour of the London bombs going off I had a neighbour from three doors up knocking at my door saying she knew this was a cheek but her sister worked at The Independent and couldn't find my telephone number and would I like to respond? I had about five more requests. But I wasn't there. I was a few miles away, happily. I don't know who did it, I don't know what happened. I suspect we are being told some of the truth. Like we were told it was a power surge to begin with - a deliberate lie so that people wouldn't panic."

He has sympathy with Jay McInerney who, in the immediate aftermath of 9/11, told Bret Easton Ellis, "I'm so glad I don't have a book coming out this month." For Barnes, "that is what life is like and that's one of the ways we can respond to it". But that is not the kind of reaction the media wants. He recalls watching an interview on the BBC in which someone close to one of the victims of the London bombs was asked what he felt about the people who'd done it.

"I feel pity for them, " he replied. "Surely, " said the interviewer, "you must feel something other than that?" But the interviewee was adamant. "No, I feel pity for them, that someone who is a human being could do such a thing to other people."

But what does Barnes himself make of recent events? He finds echoes of the Edalji case in Rushdie's; both are symptomatic of Britain's struggle to come to terms with its imperial legacy. At the time of the fatwa, he says, he saw young Asians carrying placards saying Kill Rushdie. "I would have just swept them off the street and bunged them in jail.

Well, I would have given them a good trial first for incitement to murder. The French would have done that. But no, we think that they come from hot countries and they're a bit hotheaded. I remember seeing a mob outside a mosque. They were chanting, 'What do we want? JIHAD! When do we want it? NOW!' Part of me nearly pissed myself laughing, the other thought, 'Get them out of here'."

Barnes's candour is refreshing for its sincere lack of cant. Not for him the mealymouthed banalities offered by some of his peers in recent days. Like it or not, life goes on. Amidst the the paranoia and the ignorant speculation, there is always a diversion, a crumb of indulgence, a moment of pure joy. In a corner of an English field someone will always being playing cricket. Conan Doyle was an ardent cricketer, a fact of which Barnes is well aware. "His final ambition, " Barnes writes, "was to have to have his name inscribed in the pages of Wisden." Did Doyle achieve it? Sadly he didn't, he says, but he did once bowl out WG Grace, a scalp he celebrated in a mock heroic poem of some 70 stanzas. It's all a question of perspective.

Arthur & George is published by Jonathan Cape at pounds-17.99. Julian Barnes is appearing at the Edinburgh International Book Festival on Saturday August 13 at 11.30am.