Margaret and Snowdon at Badminton horse trials in April 1970.
Photograph: Anwar Hussein/WireImage

What on earth brought on Craig Brown’s intense interest in the Queen’s late sister, Princess Margaret? At the start of his naughty new book about her, he attributes it to Margaret’s Zelig-style appearance – ubiquitous, if not exactly chameleon-like – in just about every other memoir, biography and diary written in the second half of the 20th century. It is, he writes, like playing Where’s Wally? or a super snobby form of I-spy: everyone seems to have met this prickly and parenthetical figure at least once, from Kenneth Williams to Evelyn Waugh, Ken Tynan to Elizabeth Taylor – a fact all the weirder when you know that the same people were often frequently desperate to avoid her.

But perhaps Brown’s obsession has another, more – how to put this? – Freudian source. He dishes up a Margaret-related encounter of his own. At school, he tells us, he had a friend called Michael, the second son of a lord and a nice, diffident chap to whose family houses – among them a castle in Yorkshire and a stately home in Norfolk – he was often invited to stay. It was in the hallway of their grandest place that the incident occurred. Asked to sign the visitors’ book, Brown leafed nosily through it, at which point he discovered a photograph of Margaret, posing in the same hallway in which he stood, resplendent in a blue frock and fixed smile. Beside her was Michael’s older brother, William, looking unremarkable save for one thing. The “downward trajectory” of the fabric of his trousers was, his pal couldn’t help but notice, being “sent askew by a bluff diagonal”. It seemed that at the moment the camera’s shutter clicked, poor William had been struggling to contain a teenage erection.

When people write of how this or that book made them laugh out loud, I’m suspicious; even in the presence of Pooter or Jim Dixon and his madrigals, my hoots tend to be inward. But as I read Brown’s riff on the unfathomable appearance of this image in a toff family’s social record – “did she [William’s mother] notice that something was awry, but decide to go ahead and paste the whole photograph in regardless – lock, stock and, as it were, barrel?” – I honked so loudly the man sitting next to me on the train dropped his sandwich.

Partly, this was simply because it was funny: never before has a bulge in a pair of chinos been on the receiving end of so searching an analysis. (Brown’s disquisition ranges from the natural reticence of the English upper classes to their stubborn pragmatism in the matter of wasting precious pages in visitors’ books: “They had left a large space… for a photograph of William and Princess Margaret, and they had no alternative detumescent photograph up their sleeves to put in its place.”)

Princess Margaret meets Frankie Howerd and Petula Clark at the London Palladium in November 1968. Photograph: Gamma-Keystone via Getty Images

But mostly it was because Ma’am Darling is fascinating. In its tiara-ed grip, I was unbound, released; total absorption left me as wanton and unselfconscious as Tony Armstrong-Jones – AKA Lord Snowdon, HRH’s preening, spiteful husband – after too many martinis. Which was probably just as well, given my head was stuck, for all to see, inside an improbably huge book about Princess Margaret.

Brown has done something amazing with Ma’am Darling: in my wilder moments, I wonder if he hasn’t reinvented the biographical form. Subtitled 99 Glimpses of Princess Margaret, it is described by his publisher (which, infuriatingly, hasn’t given him an index) as “kaleidoscopic”. But this doesn’t do it justice. It is a cubist book, a collection of acute angles through which you see its subject and her world (and, to an extent, our world) anew.

As Brown notes, Margaret wore her rudeness as Tommy Cooper did his fez: it was her trademark – the bitchier of her showbusiness friends actively longed for her to parade it at their parties so that they could roll their eyes afterwards. (“I hear you’ve completely ruined my mother’s old home,” she once said to an architect who’d been working on Glamis Castle. Of the same man, disabled since childhood, she also asked: “Have you ever looked at yourself in the mirror and seen the way you walk?”) But if she is ghastly, her court is worse. The groupies, the servants, the lovers. What a bunch of creeps.

Brown’s 99 glimpses comprise essays, lists, catalogues, diaries, palace announcements, newspaper cuttings and interviews, as well as parodies (one is a pastiche of Lytton Strachey; another echoes Susan Sontag’s Notes on “Camp”; yet another, in which Brown imagines how things might have gone had Margaret married her admirer Picasso, is written in the style of the artist’s biographer, John Richardson).

His reading has been prodigious: not only the diaries of everyone from Chips Channon to AL Rowse, but dozens of gruesome royal biographies and memoirs, up to and including My Life With Princess Margaret by her former footman, the slithering David John Payne. Oh, how the sinister Payne loathes the arrival in Ma’am’s life of the slugabed snapper Armstrong-Jones – a character whom Brown introduces, incidentally, with a list of the contents of his Rotherhithe bachelor pad (golden cage containing three lovebirds; miniature brass catafalque; stand in the shape of a Nubian boy).

Together, these things conjure Margaret in all her dubious glory. Nancy Mitford likened her to a “hedgehog covered in primroses”, but the reader will come to feel this is unfair to hedgehogs. The relationship with Group Captain Townsend is deliciously done: Brown doesn’t buy the schmaltz, lining himself up instead with Prince Philip, who said sarcastically, when the Queen Mother worried about where a future Mrs Townsend might live, that it was “still possible, even nowadays, to buy a house”.

So, too, is the peculiar union with Roddy Llewellyn – “[like] the put upon hero of a picaresque novel”, he writes, Margaret’s hapless young lover having, in quick succession, joined a commune, recorded an album and pranged his Ford Transit. But best of all is his portrait of Snowdon, hair and all, whose baiting of Margaret comes close to gaslighting at times.

What a cast this book has. I cannot say whether I was more fascinated by Jeremy Thorpe’s conviction that he would marry Margaret, or the notion that, in the Mustique years, she frolicked with a criminal, John Bindon, who was said to have been able to either – take your pick – balance a small sherry schooner on or dangle five half-pint glasses off his erect penis.

However peculiar, though, none of these things comes close to the eerie penumbra cast by Margaret herself. How to explain the utter rottenness of her character? In the end, one feels it must go back to her relationship with her mother, the stench of which brings to mind scent left too long in the bottle. As Hugo Vickers, that most smoothly diligent of royal biographers, noted, the Queen Mother’s “demonic” appearance at Margaret’s funeral in 2002 suggested a just hint of triumphalism. Even after she’d decided to cling to her royal privilege, her daughter always had more in common with the Duke of Windsor than ever she realised.

• Ma’am Darling by Craig Brown is published by Fourth Estate (£16.99. To order a copy for £14,44 go to guardianbookshop.com or call 0330 333 6846. Free UK p&p over £10, online orders only. Phone orders min p&p of £1.99