Garry O’Connor’s book about Ian McKellen is as much involved with ideas as it is with facts. It makes no claim to be an exhaustive account. O’Connor has been writing more or less experimental biographies of actors for many years, starting with his classic account of Ralph Richardson, continuing with Paul Scofield, Alec Guinness (twice) and a fine double portrait of Laurence Olivier and Vivien Leigh. A former drama critic, he is fascinated by the mystery of great acting. Of the present volume, he says, quoting Hamlet, but sounding more like a fairground barker: “Here is the height, the presumption of my endeavour: to ‘pluck out the heart’ of the Ian McKellen mystery – how such a single being could create a monumental career of such depth and span; where the ever-charging source of his energy comes from; and how his personality and character have continued to develop and change throughout his life. All in all to make it speak as it never has before, to sound him from his lowest note to the top of his compass.”

There is a McKellen mystery and at its centre is his duality, his paradoxical capacity to be both/and. He is simultaneously “deeply secretive, intensely private”, as his former partner Sean Mathias says, and perhaps the most open and accessible personality British theatre has ever produced.

Even his influences are contradictory, both roundhead and cavalier: on the one hand the Marlowe Society at Cambridge, where he imbibed the principles of rigorous textual fidelity and deep moral purpose; on the other Olivier, living embodiment of the theatrical. His approach is strikingly similar to Olivier’s. Both are great prose actors, resistant to lyricism and displays of personal emotion; both need to root everything in observed reality.

They had opposite journeys: Olivier a beetle-browed, gap-toothed boy with huge eyes and thin lips, physically slight, a whippet who turned himself into a panther; McKellen, built like a carthorse, who, to begin with, when he was concealing his sexuality, hid his underlying power under a carapace of assumed prettiness, which made him seem rather camp. When he came out as gay, which coincided with middle-age, he stripped himself of all that and revealed his earthiness, his masculinity. Coming out, as McKellen has tirelessly insisted, is a wonderful thing: one is finally relieved of whatever mask one has been wearing and is able to acknowledge not just who one wants to sleep with but who and what one really is. And – supreme bonus – it makes for better acting.

Facebook Twitter Pinterest The actor in 1965. Photograph: Don Smith/Radio Times/Getty Images

There is paradox here, though, even on the physical plane: his sizable feet are rarely still, tracing elaborate dainty patterns across the boards. His physical transformations have been extraordinary, none more so than his semi-paralysed, proto-Mosley Richard III: utterly, chillingly credible, a real threat. But here he differs from his hero Olivier, and also from Antony Sher, both of whom, in that role, created fairytale ogres, figures out of nightmare, dredged, one can only presume, from the actors’ subconscious selves. McKellen’s Richard was a different kind of nightmare, the sort whose hyper-realism is what renders it truly disturbing. Olivier created mythic figures, McKellen full-length portraits. So it was with his King Lear: characterised not by mental befuddlement but by a terrifying clarity of each individual thought, thoughts unconnected but each one perfectly coherent, Nietzschean aphorisms spoken in the glare of a lightning flash.

Where, O’Connor asks, does it all come from? A remote father and a caring but not especially close mother who died early? Well, yes, but more revealing is McKellen’s remarkable comment about the autobiography he gave up writing: “I was getting too emotionally upset that I hadn’t been a good enough child, because I’d not shown enough interest in them.” A devastating assessment, but it suggests that he didn’t allow himself to be close to them because he feared their power over him, feared being hurt or rejected by them, so declared his independence of them as early as possible.

His deep amorous commitments – and there appear to have been few of them – seem to have followed a similar pattern: his first long and stable relationship became stiflingly domestic, so he left; his second, more turbulent relationship, with Mathias, was too unsettling. O’Connor’s revelation is about McKellen’s passionate involvement with the actor Gary Bond, one of the theatre’s grands horizontals, with whom he seems to have fallen deeply in love. But that left him too vulnerable; it would have stopped him from doing what he wanted to do with his life, so it too ended. He briefly flirted with directing, he has been a formidable spokesman for LGBT rights, he has been close to power. But acting is what his life has been all about, and he has done it in an astonishing multiplicity of ways, on stages large and small, metropolitan and regional, in the great companies and in the commercial theatre, at the centre of a large cast and on his own.

Like Maggie Smith, he is, in the end, the great actor he is because it matters so much to him. Not the event or even the play but the fact that he is more fully alive, more fully himself, on stage than anywhere else. Crucial to his art is that we are in it with him. No fourth wall illusions for McKellen: it is all shared with an audience with whom his complicity is very frank – “Did you see what I just did?” being the unspoken question. And in life, when he is not on the stage, he is in the wings – always ready, as actors are in the wings, to share a joke or to become fascinated by some fresh thought, while all the while waiting and ready for the heightened life once they step into the light. His audiences have loved him for it, though few of the characters he has played have been lovable.

It is another McKellenish paradox that relatively late in his career, and on film, he should at last have found himself playing a character who has been universally loved, in a semi-Christian fantasy filled with elaborate pseudo-profundities of the sort that would normally be anathema to him. O’Connor devotes a long chapter to The Lord of the Rings, teasing out tenuous connections between Tolkien and McKellen himself, but the simple truth is that playing an embodiment of wisdom and truth and essential benevolence has made the actor very happy (and very rich).

By the end of O’Connor’s fascinating voyage round McKellen, the author has, as he says, peeled away as many layers as he could. Sometimes strained, the book is a stimulating complement to the most factually informative account of his life – the actor’s own website, www.McKellen.com.

• Ian McKellen is published by W&N (RRP £20). To order a copy go to guardianbookshop.com. Free UK p&p over £15.