She was drawn to bohemians, just as they were drawn to her. She liked the louche hours they kept, their smoking and drinking, their refusal to do the right thing. They, in turn, enjoyed the cachet of having a real-life princess on display. It didn’t really matter that she could be difficult. After all, being difficult was her party piece. If she happened to round off an evening with a display of her famous hauteur, then it gave them something to write about.

As for Princess Margaret, she never quite understood the stuff and nonsense to which she found herself drawn. Or perhaps she understood the stuff, but not the nonsense. “What is a bohemian? What does it mean?” she once asked a lady-in-waiting, in all innocence, shortly after her marriage to the fashionable photographer Antony Armstrong-Jones.

“Well, Ma’am,” came the reply, “with Tony it means he won’t always turn up to lunch when he says he will.”

Bohemians were, as she never quite appreciated, not entirely to be trusted: the moment you left the room they would start making their catty little remarks, and on returning home they would pen their waspish observations in their diaries, ready for publication a decade or two later.

Aged 45, the princess found herself in the lions’ den, placed between Gore Vidal and Tennessee Williams at Vidal’s 50th birthday party in 1975 at Mark’s Club in Mayfair. Among her fellow guests were Kenneth Tynan, Tom Driberg, Ryan O’Neal, Jonathan Miller and Claire Bloom; Lady Antonia Fraser brought along her new boyfriend, Harold Pinter. When Tynan got up to make a speech, he addressed them all as “comrades”, as the occasion coincided with the last day of the Labour party conference in Blackpool. He wasn’t being humorous.

Princesses Elizabeth, left, and Margaret at Ascot for the Gold Cup in June 1948. Photograph: Paul Popper/Popperfoto/Getty Images

Conversation between Williams and Princess Margaret got off to a sticky start. “I’m afraid we can’t talk to each other, Ma’am,” he said, “because we live in such different worlds”.

“What world do you live in?” asked the princess.

“Are you acquainted with the opera La Bohème, Ma’am? That’s my world.”

As it happened, Williams’s suspicion was spot on: a few years before, the princess had confided to Cecil Beaton that she “loathed” plays such as A Streetcar Named Desire. “I hate squalor! Tennessee Williams makes me feel ill!”

We know all this because Beaton jotted the conversation down in his diaries, and Williams jotted it down too, and so did Tynan, and so too did Tynan’s former wife Elaine Dundy and so did the birthday boy himself, Vidal. And, the moment her back was turned, one can imagine them imitating her squeaky, high-pitched voice. Someone who was an occasional guest at Tynan’s soirees told me that the assembled bohemians – actors, writers, artists, musicians – would kowtow to her royal highness while she was present and then make fun of her the moment she left, mimicking her general ignorance, her cackhanded opinions, her lofty put-downs, her absurd air of entitlement. The presence of the princess would endow a party with grandeur; her departure would be the signal for mimicry to commence.Beside these laughing sophisticates, the princess could sometimes appear an innocent.

And yet she thirsted for their company. Throughout her adult life, she leaned towards the artistic, the camp and the modish, even going so far as to marry Armstrong-Jones, a man at the centre of that particular Venn diagram. This means that she shows up without warning, popping her head around the door of every other memoir, biography and diary written in the second half of the 20th century. It is almost as though everyone above a certain level of fame met her, at one time or another.

She is there in the index of the Andy Warhol diaries, between Charles Manson and Imelda Marcos, and in the Kenneth Williams diaries, between Margate and Miriam Margolyes. One moment, she is attending a dinner party with George Melly, Edna O’Brien, Shirley Maclaine and a couple of Rolling Stones; the next, she is being feted in Hollywood, in pride of place on a table with Michael Caine, Steve McQueen, Neil Diamond, Gene Hackman, Jack Nicholson, Barbra Streisand, Clint Eastwood and Joni Mitchell.

❦

Where did it come from, her tendency towards the artistic? Margaret’s elder sister, their parents and grandparents regarded the arts as less to be enjoyed than endured. “Come over here, May, this’ll make you laugh,” George V called to his wife, Queen Mary, when he first set eyes on a Cézanne. Listening with her children to TS Eliot reading from The Waste Land at a wartime recital, the Queen Mother had to stifle her giggles. “Such a gloomy man ... we didn’t understand a word!” she explained some years later.

Margaret and Lord Snowdon with Elton John backstage at London’s Shaw Theatre in 1972. Photograph: Michael Putland/Getty Images

But, as she grew up, Princess Margaret was drawn to the arts as a moth to a flame, or, if not to a flame, then at least to a cushion. Early in their lives, her elder sister had cornered the market in dutifulness, surrounding herself with the tweedy and the trusty. It was only natural, then, for the more flighty Margaret, throneless and fancy-free, to go in search of company less starchy and more glamorous.

Cecil Beaton referred to her as 'the poor midgety brute', 'wealthy seaside landlady' and 'a little pocket monster'

After the young princess’s thwarted affair with the divorced Peter Townsend, 16 years her senior, the bohemians sensed that she might be one of their own, the free-thinking victim of a stiff, cold-hearted establishment. At the end of October 1955, when she announced (“mindful of the Church’s teaching that Christian marriage is indissoluble ...”) that she and the group captain were to part, the Daily Express carried an excitable “We, the undersigned” letter from a group of cutting-edge figures in the arts, among them Lindsay Anderson, Humphrey Lyttelton, Wolf Mankowitz, Ronald Searle and Tynan. They said they deplored the spectacle of “the Establishment in full cry”, going on to declare that these “encroachments on personal freedom” had “exposed the true extent of our national hypocrisy”.

She could inspire less high-minded thoughts, too, in other members of the arts fraternity. Receiving a prize from the young Princess Margaret in 1958, the 52-year-old John Betjeman was so overwhelmed by her curvaceous presence that tears came into his eyes, a reaction duly noted by his waspish friend, Maurice Bowra, the chairman of the judges, who lampooned it in a parodic verse:

“Green with lust and sick with shyness

Let me lick your lacquered toes.

Gosh, O gosh, your Royal Highness

Put your finger up my nose ...”

The dour novelist John Fowles, four years older than her, had long nursed a secret passion for her, noting in his diary in March 1951, when the princess was 20, that he found his girlfriend wanting, and “I have day-dreamed of seducing Princess Margaret”. A year later, he confessed that his first novel, The Collector, a creepy tale about a man who kidnaps and imprisons a beautiful young art student, was the fulfilment of a “lifelong fantasy of imprisoning a girl underground. I remember it used often to be famous people, Princess Margaret, various film stars. Of course, there was a main sexual motive ... a forcing of my personality as well as my penis on the girl concerned.”

Over in France, the most celebrated artist in the world was also nursing a tendresse for the young princess. It was in the early 1950s that Pablo Picasso first began to have erotic dreams about her. Occasionally, he would throw her elder sister into the mix. “If they knew what I had done in my dreams with your royal ladies, they would take me to the Tower of London and chop off my head!” Picasso confided to his friend Roland Penrose.

Peter Sellers, Antony Armstrong-Jones, Margaret and Britt Ekland in 1965. Photograph: Alamy Stock Photo

Having moved into a vast villa, La Californie, in 1955, Picasso had set his sights on the only young lady in the world he deemed worthy of it. There was, he said, just one possible bride for him: the 24-year-old Princess Margaret. Not only was she as royal as can be, but she was also his physical type: shorter than him (he was five foot four inches, so would tower over her) with beautiful skin and, he noted approvingly, good strong teeth. He made it clear to the British art dealer Douglas Cooper that this was more than a whimsy. In fact, he would not let the matter drop, growing more and more absorbed in plotting the right strategy. He would, he said, draw up a formal proposal on parchment, in French, Spanish or Latin, for Cooper to present to Her Majesty the Queen on a red velvet cushion. John Richardson, Picasso’s future biographer, was to stand by, dressed as a page or a herald, complete with trumpet. “If we didn’t have the right clothes, Picasso would make them for us: cardboard top hats – or would we prefer crowns?” recalled Richardson. “He called for stiff paper and hat elastic and proceeded to make a couple of prototypes.”

Picasso’s fascination with Margaret stayed close to fever pitch for a decade or more. When Penrose escorted her round the Picasso exhibition at the Tate Gallery in 1960, he told the princess how sad the artist would be to have missed her. “She smiled enchantingly and I think I glimpsed a blush spreading beneath her tan,” Penrose reported back to Picasso.

Despite the persistent efforts of Richardson, Cooper and Penrose, Picasso’s passion for Princess Margaret was never reciprocated, let alone consummated. In fact, quite the opposite. “Many years later, I told Princess Margaret the story of Picasso’s quest for her hand,” recalled Richardson. “Like her great-great grandmother Queen Victoria, she was not amused; she was outraged. She said she thought it the most disgusting thing she had ever heard.”

In one way or another, the princess’s encounters with artists never quite went according to plan, perhaps because, when push came to shove, each side would refuse to kowtow to the other. They all follow the same arc: the princess arrives late, delaying dinner to catch up with her punishing schedule of drinking and smoking. Once at the table, she grows more and more relaxed. By midnight, it dawns on the rest of them that she is in it for the long haul, which means that they will be too, since protocol dictates that no one can leave before she does. Then, just as everyone else is growing more chatty and carefree, the princess abruptly remounts her high horse and upbraids a hapless guest for overfamiliarity. “When you say my sister, I imagine you are referring to her majesty the Queen?”

❦

At such moments, it is as though she was released by alcohol from the constrictions of informality. After a succession of drinks, she was at last able to enter a stiffer, grander, more subservient world, a world in which people still knew their place: the world as it used to be. And then her rudeness knew no bounds. It was almost as though, early in life, she had contracted a peculiarly royal strain of Tourette syndrome, causing the sufferer to be seized by the unstoppable urge to say the first thing that came into her head, just so long as it was sufficiently unpleasant.

Ryan O’Neal meets Margaret in the Odeon, Leicester Square, for the royal film performance of Love Story. In the centre is Olivia de Havilland. Photograph: Bob Dear/AP

In 1970, the film producer Robert Evans flew to London to attend the Royal Command Performance of his film Love Story, in the presence of the Queen Mother. He was later to recall their brief encounter.

“All of us stood in a receiving line as Lord Somebody introduced us, one by one, to Her Majesty and her younger daughter. It was a hell of a thrill, abruptly ending when the lovely princess shook my hand.

“Tony saw Love Story in New York. Hated it.”

“Fuck you too,” I said to myself, smiling back.

The rebuke became her calling card, like Frank Ifield’s yodel or Tommy Cooper’s fez. An avid follower of the arts, she seemed to take delight in expressing a damning verdict after each show, often to those involved in it. Introduced to the TV producer Dennis Main Wilson, she asked him what he did. He told her he produced “a little show called Till Death Us Do Part”, to which she replied, “Isn’t that that frightfully dreary thing in the East End?” In 1990, Richard Eyre, the artistic director of the National Theatre, was obliged to stand in the foyer to await her arrival for a preview of Stephen Sondheim’s Sunday in the Park with George. “As she comes in she announces to me quite loudly that she can’t STAND Sondheim. She demonstrates this quite conspicuously throughout the evening.”

Two years later, she attended a preview of Rodgers and Hammerstein’s Carousel. After meeting the cast, she was escorted to the door by Eyre, who made a note of their brief conversation:

ME: I’m glad you enjoyed the show.

SHE: I didn’t. I can’t bear the piece.

Even when given her own chance to perform, she did so very off-handedly. Playing herself at the Borsetshire Fashion Show on The Archers in 1984, she sounded curiously flat and uninvolved, almost as though she couldn’t get to grips with her own character. After the first run-through, the producer, William Smethurst said: “That’s very good, Ma’am, but do you think you could sound as if you were enjoying yourself a little more?”

“Well, I wouldn’t be, would I?” replied the princess.

❦

Of course, the artists and writers had the last laugh: they always do. One or two stood up to her at the time. Francis Bacon stood at the back and heckled as she was singing a selection of cabaret songs. Finding himself at an adjacent table to where Princess Margaret and Lord Snowdon were dining with Bryan Forbes, Nanette Newman and Peter Sellers, a drunken Dudley Moore staggered over to the princess, bowed low and, with a demonic gleam in his eye, slurred, “Good evening, your royal highness. I suppose a blow job is out of the question?” At a reception in the Dorchester Hotel after the royal premiere of A Hard Day’s Night, the 21-year-old George Harrison, feeling peckish, said the words that so many people, before and after, dreamed of saying: “Your highness, we really are hungry and we can’t eat until you two go.”

“I see,” said the princess obediently. “Well, in that case, we’d better run.”

Margaret and Mick Jagger in Martinique in 1976. Photograph: Jacques Gustave/AFP/Getty Images

But most waited until she was safely out of sight, or better still dead, before taking their revenge. The most spiteful were those who had once been most sycophantic. Cecil Beaton refers to her in his diaries as, successively “the poor midgety brute”, “like a wealthy seaside landlady” and “a little pocket monster”. Sir Roy Strong, whom she had welcomed to so many dinner parties over the course of three decades, calls her “tiresome, spoilt, idle and irritating” in his diaries. Leaving her service of remembrance at Westminster Abbey, he reflects that “she was such a capricious, arrogant and thoughtless woman”.

Oddly enough, it was the most caustic of commentators, Gore Vidal, who remained most loyal, even though that loyalty was not always reciprocated. “The trouble with Gore,” she once observed, “is that he wants my sister’s job.” Four years after her death, Vidal declared that Princess Margaret had been “far too intelligent for her station in life”, adding that “she often had a bad press, the usual fate of wits in a literal society”. He claimed that she had once told him the reason for her unpopularity. “It was inevitable; when there are two sisters and one is the Queen who must be the source of honour and all that is good, the other must be the focus of the most creative malice, the evil sister.”

The language sounds more like his, but the sentiment was undoubtedly hers. Margaret thought the world cruel for seeing her as the negative version of her sister, yet it was also how she came to define herself.

In middle age, hurt by life, she retreated into camp, becoming a nightclub burlesque of her sister. But she was never camp in the same way that the Queen Mother was camp. Her camp was not arch or sentimental. It did not strive to be inclusive, or merry, or to render the world as a romp. She didn’t twinkle or sparkle. She would never say “Such fun” as though she meant it; she would take pains to inject the phrase with a dash of generalised irony. Nor was she camp in the service of something beyond herself. She had no wish to draw others in, and refused to offer them the illusion, however fleeting, of parity. Being thought “real” or “down to earth” is not what she wanted.

She was of royalty, yet divorced from it; royalty set at an oblique angle, royalty through the looking glass, royalty as pastiche. At a fancy-dress party on Mustique, she wore a Valkyrie outfit, hired for her by Colin Tennant from a Los Angeles costumier, and in it she mimed an aria from the Ring Cycle. For her 50th birthday, the Tennants gave her a gold-embroidered dress from India. “I’ve always LONGED to have a dress like that,” she said. “It’s what a REAL princess would wear.” She was royalty as Hokey-Cokey, one-foot-in, one-foot-out; royalty as real yet unreal; royalty as real as you want it to be, as the mood takes you.

She was cabaret camp, Ma’am Ca’amp: she was Noël Coward, cigarette holders, blusher, Jean Cocteau, winking, sighing, dark glasses, Bet Lynch, charades, Watteau, colourful cocktails at midday, ballet, silk, hoity-toity, dismissive overstatement,, arriving late, entering with a flourish, exiting with a flounce, pausing for effect, making a scene.

Ma’am Ca’amp is having a drink in a cut-glass tumbler delivered to you in the swimming pool and then ordering your hostess to bring the tumbler into the pool, even though she is fully clothed. Ma’am Ca’amp has her hosts’ compliance in these antics. Ma’am Camp enjoys inverting expectations: to those expecting grace, it presents hauteur; to those wanting empathy, it delivers distance. To those in need of tradition, it offers modernity. To those in need of modernity, it offers tradition.

It is languid, bored, world-weary, detached, bored, fidgety, demanding, entitled, disgruntled, bored. It carries the seeds of its own sadness and scatters them around like confetti. It is disappointment hiding behind the shield of hauteur, keeping pity at bay.

It is pantomime as tragedy, and tragedy as pantomime. It is Cinderella in reverse. It is hope dashed, happiness mislaid, life mishandled. Nothing is as thrilling as they said it would be: no one is as amusing, as clever, as attractive or as interesting. The sun never shines as bright as it used to, and even the fiercest thunderstorm lacks any real sense of drama or pizzazz. When Cinderella dies, her little glass slipper is put up for auction, a memento of days of hope and innocence. The catalogue entry reads, “Only worn once”.

• Ma’am Darling: 99 Glimpses of Princess Margaret is published by 4th Estate. To order a copy for £14.44 (RRP £16.99) go to bookshop.theguardian.com or call 0330 333 6846. Free UK p&p over £10, online orders only. Phone orders min p&p of £1.99.