William McIlvanney in 2011. He held that the impetus behind his books was to give flesh to “the unfulfilled stature” of the dreams of his parents and the Kilmarnock community that he came from.
Photograph: Murdo Macleod for the Guardian

William McIlvanney, who has died aged 79, grew into the title “the godfather of tartan noir” – the term for Scottish crime fiction – though it was not one he fully welcomed. His grander ambitions are represented by the autobiographical novel Docherty (1975), a kind of Sons and Lovers of the industrial west of Scotland, for which McIlvanney was awarded the Whitbread prize. It was, however, the Glasgow-based crime novel Laidlaw, published two years later, which caught the fancy of the broader reading public.

Detectives with existential anxieties, marriage problems and a deep literary hinterland are not uncommon now, but Detective Inspector Jack Laidlaw was a bright arrival on a dull Scottish literary scene in 1977. In policing the rougher territories of Glasgow and environs, Laidlaw found many things stacked against him; what he had going for him were a realistic outlook on life, abundantly laced with wit and philosophical reflection – a voice he inherited from his highly articulate creator.

No one had previously encountered a Glasgow cop who described his regular tipple as “low-proof hemlock” and who hid his Camus and Kierkegaard in the desk drawer, the way an alcoholic keeps a secret stash. McIlvanney could say of Laidlaw, “He knew nothing to do but inhabit the paradoxes”, and make it sound like Glaswegian common sense.

McIlvanney was born in the Ayrshire town of Kilmarnock, the son of a miner, William, who was “educated below his ability” and a mother, Helen (nee Montgomery), who “defused trouble of every kind, physical, emotional, financial, with calm persistence”. The family, with four children – William’s elder brother Hugh is the renowned sports journalist – was “comparatively poor”, but school records at Kilmarnock Academy show McIlvanney to have been “a brilliant pupil”, taking classes in Latin, Greek and French, as well as other subjects. He went on to study English at Glasgow University, where, he wrote, “every conversation was littered with the corpses of abandoned prejudices. If I’d looked in a mirror I wouldn’t have been surprised to find no reflection there.”

William McIlvanney interviewed on the BBC’s Newsnight Scotland in 2013

By the time his first novel, Remedy Is None, was published in 1966, McIlvanney had embarked on a career as a schoolteacher. A second novel, A Gift from Nessus, followed two years later. Both won prizes – the Geoffrey Faber memorial award and a Scottish Arts Council publication award, respectively – but neither had notable commercial success. There were few novelists active in Scotland in those days – fewer in the industrial west than elsewhere – and McIlvanney would always have a hard time impressing his considerable gifts on readers south of the border and across the Atlantic.

The dialogue in Docherty, which McIlvanney considered his most important achievement, was not immediately welcoming to outside ears: “‘That’s richt.’ Tam was laughing. ‘You cairry oan. An’ the Germans’ll no need tae kill ye. Ah’ll save them the joab.’” With Laidlaw, however, he established a voice that straddled his working-class background and his educational advantages: streetwise and intellectual at once. An unintended “paradox” of this success can be found in an essay, Growing Up in the West, written for the anthology Memoirs of a Modern Scotland (1970), edited by Karl Miller, in which McIlvanney, in a tone not entirely free of chip-on-the-shoulder touchiness, lists his “credentials” as a working-class loyalist: “broth is better on the second day … I call a spade a shovel, the mantelpiece ‘the brace’” etc, culminating in the radical’s gold medal: “And I don’t like policemen.”

There were to be two further outings for Laidlaw: The Papers of Tony Veitch (1983) and Strange Loyalties (1991). The latter switched from third to first-person narration, suggesting scope for yet more convoluted self-inquiry, but there were to be no more adventures; the three existing ones were republished together in 2013. It was the godfather’s godchildren – Ian Rankin, Val McDermid, Christopher Brookmyre and many others – who turned Scotland into a land of wretched victims and ingenious crime solvers. Persistent rumours of a Laidlaw television series have so far failed to materialise. In 1990, McIlvanney’s novel The Big Man, about a Glasgow prize fighter, was made into a film starring Liam Neeson and Billy Connolly.

McIlvanney’s teaching career spanned the years 1960-75: first at Irvine Royal Academy and then at Greenwood Academy, Dreghorn, where he was promoted to the rank of assistant headteacher. During this period, he married and had two children, Siobhan and Liam, who both became academics. The marriage broke up in the late 1970s. For many years he lived in Glasgow’s south side with his partner, Siobhan Lynch, a primary school teacher; she and his children survive him.

The decision to give up teaching in order to write full time was made after the publication of Docherty, and would have seemed to be justified by the success of the first Laidlaw novel. But Scotland has never been an easy place to make a literary living. McIlvanney had a stint as a presenter of a BBC books programme, a spell as a columnist for the newspaper Scotland on Sunday, and a number of periods as a teacher of creative writing at Scottish universities. It wasn’t possible to teach people how to write, McIlvanney believed. The best hope was to get them to read.

A book every four or five years is not a shameful rate of production, but the later years were less productive than the earlier ones, at least in terms of fiction. The Kiln, a successor to Docherty, featuring Tam Docherty’s grandson, came out in 1996. There was then a 10-year gap before Weekend, an uncharacteristic adventure which follows a group of students and teachers to a Scottish island, where they congregate for a study session at a Victorian mansion, Willowvale. In characteristic McIlvanney fashion, they themselves become the real focus of inquiry. “What people met in Willowvale’s corridors was perhaps the ghost of something in themselves, the unfulfilled stature of their dreams, looking for flesh.”

The reluctance he felt about applying himself to practical deadlines is illustrated by the negotiations over his proposed biography of Sean Connery. The actor expressed interest in the project and, as McIlvanney told it, suggested getting in touch with his agent in New York “to sort out a deal” – which McIlvanney, who had initiated the project, failed to do. “My recurrent tendency to vanish for weeks into my scribbling preoccupations had done it again.” Connery took umbrage and looked elsewhere. McIlvanney’s attempts to piece together a biography of sorts, without the subject’s cooperation, can be read on his website.

In addition to his novels, McIlvanney published poems – The Longships in Harbour (1970) – and essays – Surviving the Shipwreck (1991). His influence on younger generations of Scottish writers is beyond dispute. The life of “sybaritic ease” invoked in Growing Up in the West was easy only by contrast with the lives led by his parents and the community on High Street, Kilmarnock (transformed in Docherty into High Street, Graithnock). It was his stated purpose to create a series of books that would give flesh to “the unfulfilled stature” of these people’s dreams, or at least their daily struggle.

McIlvanney was a good-looking, photogenic man, with a wispy Clark Gable moustache and an old-fashioned courtesy, particularly in regard to women. He relished Glasgow’s hardman atmosphere, and although he himself wanted to be thought of as more tender than tough, the defensive persona was not easily let go. “I write as I feel compelled to write,” he told the Scottish Review of Books in 2010. “You don’t like it, read somebody else.”

•William Angus McIlvanney, writer, born 25 November 1936; died 5 December 2015