In 1908, wearing little more than a jewelled breastplate and a transparent skirt, the Canadian dancer Maud Allan stormed the fortress of British proprieties with her solo work, The Vision of Salomé. Allan danced an audacious choreography of desire, her body "swaying like a witch, twisting like a snake, and panting with [a hypnotic] passion", according to one dazed viewer. But while several theatres outside London barred Allan's performance as indecent, to her legions of women admirers, she was an inspiration. Margot Asquith, wife of the Liberal PM, was among those who saw Allan's dancing as a liberating expression of female sexuality.

The early decades of the 20th century were an exhilarating battleground for women, with key gains made in political and legal reform. But women were also testing out another arena of emancipation: their bodies. As fashions grew simpler and skirts rose higher, reaching knee-length by the late 1920s, women found new physical freedoms – or, at least, those with sufficient money and time to take advantage of them.

In contrast to their bustled, draped and corseted grandmothers, they could feel the sun and wind on their limbs; they could run, stride and ride a bicycle with ease. They could also dance – and it's surely no coincidence that this was an era obsessed with dancing. From the barefoot ecstasies of Isadora Duncan, whose free, expressive dancing struck a blow against the corseted rigours of classical ballet, to the collective "jazzing" of the 1920s, dance came to play a surprisingly emblematic role in the story of women's liberation.

The impact of Allan's Salomé spread far beyond theatre. To one rightwing politician, Noel Pemberton Billing, its eroticism was nothing less than an incitement to female depravity, specifically lesbianism. A decade later, with Britain at war, Billing published an article in his magazine Vigilante, accusing Allan of being key to a perniciously widespread "cult of the clitoris", and symptomatic of the unpatriotic decadence that was undermining the upper echelons of British society.

Even if Allan wasn't driving women to Sapphic wickedness, she was, in the words of another commentator, "promoting a dangerous tendency to dancing". And it wasn't just on the stage, but on the dancefloor, too, that women were displaying an alarming lack of modesty, with the social dances that began spreading through the west just before the first world war. Driven by the rhythms of American ragtime, the Bunny Hug, the Turkey Trot and the Grizzly Bear triggered a riotous deviation from the formality of the ballroom.

These encouraged dancers to kick up their feet, rock crazily from side to side and lock their swaying pelvises together. In 1914, the Vatican felt compelled to issue a formal denunciation of their suggestive, animalistic moves. To the young and very aristocratic British socialite Lady Diana Manners, these ragtime dances were part of a new "budding freedom", a sign that "Victorianism" had finally lost its grip.

Nightclubs had begun to appear in London in 1912 and, whenever Manners was able to evade her chaperones, these dark and crowded basements promised a cocktail of illicit thrills: smoking cigarettes, wearing lipstick, drinking Pink Ladies – and dancing. Her own expertise on the floor had been fuelled by a year of formal training in ballet and Russian folk dance. The physical poise she acquired wasn't just unusual for a woman of her class, though; it also provided a necessary boost to her confidence after the war, when she further flouted tradition by embarking on an acting career. Not only did this take her to Broadway, it also allowed her to support her husband, Duff Cooper, through his first years as a politician.

In the 1920s, ragtime was superseded by the wayward jangle and bounce of the Charleston and by the pert, buttock-flourishing naughtiness of the Black Bottom. Zelda Fitzgerald, famously the inspiration for her husband F Scott's fictional flapper heroines, was also a wicked exponent of the decade's jazz dances. The celebrity myths that accumulated around the Fitzgeralds were fed by stories of Zelda lifting her skirts high above her waist to emphasis the sway of her hips – and the flash of what Ernest Hemingway was pleased to call her "long nigger legs".

If dances were getting wilder, so too were morals. Between 1914 and 1929, the divorce rate doubled in the US and surveys reported that premarital sex was rising even faster. The promiscuity of young women caused alarm, particularly in Britain where, after the carnage of the war, it was estimated that only one in 10 were likely to find a husband and settle down to marriage and motherhood. As early as 1919, sympathy for their plight ebbed as the press began to speculate about the kinds of selfish, destabilising pleasures these single young women might be indulging in. The Daily Mail warned that the number of "superfluous" females could be a "disaster to the human race".

Dancing continued to be a lightning rod for public concern. In 1923, when Tallulah Bankhead came to London to advance her acting career, it wasn't just the delicious huskiness of her Alabama accent or the fizz of her personality that clinched her success. It was the topicality of the play in which she made her debut. The Dancers, written by Gerald du Maurier and Viola Tree, dramatised the arguments for and against liberated 1920s flappers through the stories of two very different dance-mad women. Bankhead's character Maxie was a professional cabaret artist whose dancing symbolised her independence; she earned her own money, and made her own way in the world. Her opposite number Audry, however, was a socialite whose addiction to dancing led only to a neurotic netherworld of nightclubs, cocktails and sex.

Fizz ... Tallulah Bankhead in 1925. Photograph: Alamy

Race was another taboo being broken, as the era saw a mass emigration of black American musicians and dancers into the major cities of Europe. Ada "Bricktop" Smith, a cabaret singer from West Virginia, became doyenne of the Paris nightclubs, giving Charleston lessons to everyone from the writer and heiress Nancy Cunard to the Prince of Wales. And when a skinny chorus girl from St Louis called Josephine Baker was shipped over to Paris in 1925 to perform in the fashionable Revue Nègre, her subversively inventive versions of jazz dance were hailed by artists and intellectuals as genius. Picasso called her the "Nefertiti of now" – and such was the impact of her dancing that she became elevated to an aesthetic ideal.

Having endured racial abuse and discrimination back home, Baker was now advertising beauty products that allowed white women to mimic her own glossy cropped hair, her burnished skin and supple silhouette. It was an astonishing turnaround for her. But it also demonstrated the power that the symbols of the jazz age – its clothes, music and dancing – had to cut across social barriers.

Alive and kicking ... a Charleston competition at the Parody Club, New York in 1926. Photograph: Hulton Archive/Getty

But to the American writer Dorothy Dunbar Bromley, the flapper represented a new spirit of emancipation. If women were to follow their "inner compulsion to be individuals", they had to throw off their shackling inheritance of obedience, whether to the puritanical tenets of old-school feminism or to the sentimentalised duties of marriage and motherhood. It wasn't hardcore politics but, on the dancefloor at least, these women of the 1920s embodied Bromley's views. As they shimmied their shoulders and swivelled their hips, they were released into a brief but deeply subversive world – a world of freedom.