NOT so long ago William McIlvanney had an appointment with a doctor.

Age had crept up on him - he was 78 last November - and his body was beginning to creak in places he'd forgotten were ever a part of him. His mobility was limited and even a stroll to the shops took an effort that left him feeling he could do with a fortnight in the Caribbean. The doctor was one of that ilk who had obviously missed the bedside manner component of the course. His patient, he declared, with all the sympathy of a judge dispatching a starving orphan accused of stealing a sandwich to a lifetime's exile in Van Diemen's Land, had two choices. One was a zimmer, the other a wheelchair. McIlvanney, it is perhaps fair to say, was more than a little put out. What his verbatim response was has not been recorded for posterity but there is little doubt that it involved language that may best be described as "unparliamentary".

Happily today, ensconced in the Central Hotel in Glasgow, "the city of the stare", as he once glossed it, where you never know when next your privacy is about to be breached, McIlvanney has no need of zimmer or wheelchair. He may be one of the walking wounded, moving stiffly and gingerly, but to a medically untrained eye he looks in pretty decent nick for a man who, as he testifies, hasn't "exactly lived a careful life". He is as lean as a whippet and impeccably turned out, in a symphony of blacks and greys, his shoes gleaming like a guardsman's boots. He has full head of hair and retains the whisper of a moustache that makes one thinks of movie stars such as Clark Gable or Humphrey Bogart. His accent, meanwhile, still has in it enough west-coast grit to ensure safe passage on an icy road.

For some years McIlvanney seemed to be in danger of becoming forgotten, one of those once hymned writers whom time, that lethal winnower, consigns to the library stacks. Of late, however, he has enjoyed something of a renaissance. Discovering that novels like Laidlaw, Docherty, The Big Man and The Kiln were out of print, Edinburgh-based publisher Canongate set about republishing them and has found a new generation receptive to their charm. Championed as "the godfather of tartan noir", McIlvanney is now feted by luminaries of Scottish crime fiction, including Ian Rankin, Denise Mina and Christopher Brookmyre. These days he is invited to book festivals in far-flung places at the behest of delighted organisers who have just discovered him as they might a Rembrandt in the attic. And later this month the Glasgow Film Festival is premiering a half-hour documentary commissioned by BBC Scotland, titled William McIlvanney: Living With Words, in which its subject reflects on a career that has spanned half a century.

It is a belated validation of McIlvanney's inimitable talent. Sometimes, he says, he thought "maybe I'd had my shot at it", being under no illusion of the fickleness of literary fate. Another of his books is Surviving The Shipwreck, which contains an essay titled The Shallowing Of Scotland. In it, he recalls coming across a family copy of Maxim Gorky's autobiography, My Childhood, which has survived but which few folk outside Russia read in the 21st century. But, as McIlvanney is well aware, a book needs only one reader to start a ripple. "Handling the book, I found summoned up in me, through the necromancy of touch, reminders of where I came from and why I think as I think and why I believe as I believe."

As he portrays it in the essay, his upbringing in the 1940s in predominantly working-class Kilmarnock was one in which books and learning were respected and words were a currency whose value was unvarying. His childhood, like Gorky's, was formative, its legacy enduring, his loyalty to it unswerving. He was hugely influenced by his mother and father, aunts and uncles, few of whom, it would appear, were backward at coming forward. One uncle, he recalls, was always on tap to offer advice and gentle reproach to a boy inclined to bend rules and whose curiosity was likely to lead him astray. It was a tough environment. His uncle, like so many in that community, was a socialist and a committed communist, which bred a sustaining attitude to life and education, hence the copy of Gorky. "He couldn't be intimidated, only convinced, and that was one difficult trick," wrote McIlvanney. "He liked to argue the way Gargantua liked to eat."

McIlvanney could have been referring to himself. Lucky is a word he uses often in our conversation. He was born too late to be involved in the Second World War and early enough to benefit from the National Health Service - the gift of "the only socialist government we've had in my lifetime" - and free admittance to higher education. Of the latter, he says: "It was like the invasion of the Visigoths. There were so many working-class kids. We had terrific brainstorming sessions in the uni bar, whether the facts were able to attend or not. That to me was a great part of education as well. That sharing of issues and discussion."

It was while he was in his first year at Glasgow University that his father - "five-feet-four with a PhD in outrage" - died. He'd gone into hospital and his son remembers going to the local grocer's where his older brother, Hugh, the acclaimed sports writer, asked to use the phone because there was none in their home.

"I always remember that. Hughie phoned up and I was standing beside him and he simply said, 'Three months?' And I knew what that meant. It was cancer. That three months was a kind of correct prophecy. It would be about that. I used to get the train to Glasgow at half seven and I went in every morning to talk to him because I just wanted to have as long a connection as I could. It struck me how much it mattered to him because one day I opened the door to check and he shouted 'Willie'. He thought I was going to go without our little chat. I wasn't going to do that. I thought, 'This really means something to this man.'"

It is perhaps no coincidence that McIlvanney's debut novel, Remedy Is None, which appeared in 1966, concerns the death of a father. Though it is not overtly autobiographical it is clear that it contains elements of it. For example, Charlie Grant, its principal character, is an undergraduate at Glasgow University whose father has scrimped and saved to give him the future that was not on offer to himself. McIlvanney's template was Hamlet. The novel won him the Geoffrey Faber Memorial Prize and its author can still recite the verdict of a brace of reviewers. "One said - I think it was in the Observer: 'He creates characters so strong you feel you might not put up much of a show in their company'. The Times said: 'Full of the joy of writing and alert to the anguish of life.' I thought, 'That'll do me.' I carried those around in my head like the iron rations of self belief. Somebody believes! It gave me the strength to go on."

But what the prize and the reviews did not supply him with was a means to earn a living. So, like a lot of Scottish writers, McIlvanney decided he would teach. As the 1960s morphed into the 1970s, he found himself living parallel lives. During weekdays and daylight hours he'd be in school talking about books and writers. In the evenings, at weekends and during holidays, he would write. For teaching, he says, he had "no missionary zeal" but soon discovered he had a passion for it. Eventually, however, disenchantment set in, not with life at the chalk face but with the changes in the profession. "There were a lot of people who couldn't teach their way out of a paper poke who were trying to transform the business." He left, soon ran out of money, and took a job for a year in Grenoble in France, teaching literature to the children of well-heeled Americans, who came to class barefoot and wearing bandanas. "Hi coach," they'd greet him. When he left one student told him. "Well coach, it's been real." Back in Scotland he applied for a part-time job and was talked into becoming a principal teacher. Later he was promoted assistant head, at which point McIlvanney realised he had risen to a level beyond his capabilities. "Within a few months I thought, 'I'm a disaster here'. I was running about with wee bits of paper. But I couldn't organise a raffle. All I could do was be in the classroom. I packed it in after a year."

By then in any case he had been tempted by two newspapers to cover the 1974 World Cup finals in Argentina. It meant spending seven weeks away from home which, McIlvanney acknowledges, did not amuse his then wife. "I don't think she was best pleased. There were other factors but I'm sure that was one of the factors that eventually killed the marriage." Argentina proved cathartic not only for him but also for a nation and Ally MacLeod's deeply deluded army which travelled hopefully only to be dumped in a slough of despond. Like one of the few survivors of the Battle of Flodden, McIlvanney recalls that surreal campaign with a combination of pain and disbelief. For not only were Scotland meant to breeze through the group stage, they were touted as potential winners of the World Cup. Or so MacLeod said. Asked what he planned to do after the tournament, he replied: "Retain it." McIlvanney's remembrance remains rose-tinted. "It was astonishing. It was interesting to see how Scottish we remained in the international context."

Laidlaw was published in 1977. For McIlvanney, its hero, Jack Laidlaw, and Docherty's Tam Docherty are two Scottish archetypes. "To me Docherty is an expression of a whole stretch of working-class life. He's a kind of figurehead for that time and that place. And Laidlaw is not just an inspector of crime; he's an inspector of society. He's commenting on where we are and the problems of where we are and the aspects of where we are. I didn't set out to write a detective novel." In that regard, he likes to quote Gore Vidal, who once talked about "colonising the genre", the idea being to bridge the gap between "quality" or "literary" fiction and "popular" fiction. At the time, McIlvanney was not impressed by the kind of novels which won the Booker Prize. He was also keen to write about Glasgow, in all its glaur and glory, as Zola and Balzac once did for Paris. Above all, though, he heard the voice of a man whom we now know as Jack Laidlaw who, when he's not drinking "low proof hemlock", is immersed in the philosophy of Kierkegaard, Camus and Unamuno.

Inspector Laidlaw, McIlvanney instinctively knew, came from a hard place and was used to mixing with hard men, some of whom did terribly bad things. His is a world in which there is no them and us, only us. Judgement is a privilege he cannot afford. His voice is as insistent and distinctive as Raymond Chandler's Marlowe and Dashiell Hammett's Sam Spade. Rightly, McIlvanney has always baulked at those who suggest the Laidlaw books are police procedurals or mysteries. Rather they are uncategorisable. While he's grateful for the attention that the "godfather of tartan noir" label has brought him, he is not inclined to embrace it. "It's nice to have an accolade," he says, "but it's a dubious accolade in that it shifts the focus of what I think is the core of my own writing. But I'll take that because somebody might pass from Laidlaw to the other books. Tartan noir doesn't really appeal to me. It always conjures up the image of a Glasgow heavy in highland dress, and there are not too many of them around."

William McIlvanney: Living With Words is at the Glasgow Film Festival at 6pm, on Monday, February 23. It screens on

BBC Two Scotland the following Friday, February 27 at 10pm