I’ve never forgotten the first time I saw Kesha. It was at T in the Park 2011, an otherwise unmemorable weekend festival in Scotland. During her main-stage performance, the woman then known as Ke$ha told the crowd that she had one pressing question. “Is there,” she said, prolonging the anticipation, “enough glitter on my titties?” The noisy consensus was no, there was not, so her accomplices doused her in a can of lager and an explosion of gold that left her looking like the daughter of C-3PO and Dolly Parton.

These gleeful exploits defined Kesha Rose Sebert as a pop star for a while. She followed her defiantly trashy 2010 debut, Animal, with the equally riotous Warrior in 2012, becoming a trailblazer for hedonistic pop. Then she disappeared. In 2016, a new image emerged: Kesha wearing a white suit, sobbing in court as she tried to escape her contract with the producer Dr Luke (AKA Lukasz Gottwald), whom she accused of sexual and emotional abuse including date rape and bullying that led to her developing an eating disorder. He denied the allegations. Her case was dismissed. While she could pick new collaborators, she still had to record for his label, an imprint of Sony, and he countersued for defamation.

Kesha’s third album, 2017’s Rainbow, arrived during her legal struggles. While she couldn’t sing about her alleged strife, she made her stance plain: “When I’m finished, they won’t even know your name,” she belted on Praying. The rockier, more personal album earned her the best reviews of her career. “I was not used to having nice press,” Kesha says with a small, stunned laugh. “It was shocking, and also at a time where I so needed kindness.”

But the validation left her feeling uneasy. “I don’t feel as if I’m beholden to be a tragedy just because I’ve gone through something that was tragic,” she says. “That’s really important for people to know – you do not have to be defined by something that was done to you.”

It is early October. Kesha, now 32 and newly brunette, has just debuted her new album, High Road, at a glitzy playback for the media. A few downbeat songs aside, her new music revitalises her rowdy trademark sound – in the way that Tina Turner and Rihanna did after rejecting their own victim narratives. “After Praying, people thought I’d always take the high road,” she tells us, handing out tequila. “And this song is about getting super fucking high.”

A while later, the drink worn off, Kesha sits in a hotel room. She is wearing enough gold chains to deflect a bullet and the glitter is back: translucent blue hearts encrusted beneath her eyes; gothic, bejewelled nails that look like 10 mini Iron Thrones crowning heavily tattooed arms. But she is nervous, speaking carefully and often steering her answers back to her gratitude for her fans’ kindness – not so much platitudes, more a conversational safety net for a woman legally prevented from discussing certain things. She returns that kindness, too. When I ask for advice about a shared experience, she goes off-record and is so compassionate that I have to pull myself together before continuing.

Before starting her fourth album, Kesha didn’t think she deserved to make happy music. “I can be so fucking mean to myself,” she says, sighing at the understatement. Her brother told her she should be writing pop songs, the thing she was good at. “And I was pissed!” she says. “I don’t do well with people telling me what to do, and I was so conflicted about what I wanted versus what was expected of me, and trying to please everyone is exhausting.”

She wrote her defiance into a rumbling thigh-slapper called My Own Dance: “What’s a girl to do? / You’re the party girl / You’re the tragedy / But the funny thing is I’m fucking everything.” She still had to be talked into following the poppy direction it suggested. “There was an element of not feeling like I should be celebratory because of everything I’ve gone through so publicly.” She pushed through: on High Road, wine is smuggled in handbags, impromptu drunk tattoos are inked, plentiful highs are toked.

On Jimmy Kimmel Live! in October 2019. Photograph: REX/Shutterstock

It is as rebellious for Kesha to make feckless pop now as it was a decade ago. Then, she preached crashing the party, “pissing in the Dom Perignon” and the sexual liberation of women and LGBTQ people. She was seen as an emblem of the post-recession generation, revelling in the wreckage of their promised future. While she wasn’t consciously addressing the economy, she says she related to “growing up without extravagance”, recalling her mother, the Nashville songwriter Pebe Sebert, using food stamps. “But she still found a way to make life very joyful, and I never felt like I went without.”

Kesha never knew her father – never wanted to, although she contemplates what that might have been like on a softer new song, Father Daughter Dance – and says her childhood fostered her “nihilistic” approach to life: “Nothing matters, the world is going to burn up one day so I might as well have a good time while I’m here, because what is the point of life? I don’t know. But I have found that speaking from the heart and creating have made me more able to cope with that intensity.”

Kesha’s verve excited Dr Luke. After he heard a country song and a goofy rap number that she had recorded during her mum’s studio time, his interest was piqued by the latter and he brought the teenager to work with him in Los Angeles. The newly christened Ke$ha released her debut single, Tik Tok, in 2009. It spent nine weeks at No 1 in the US and announced the loud arrival of a new pop archetype: the female libertine who brushed her teeth “with a bottle of Jack” before an all-nighter.

The outraged response is quaint to revisit, not least because she steals a pushbike in the video. “There was some quote that said: ‘Everyone’s acting like Kesha is walking door to door selling butt plugs and heroin.’ I remember thinking, this is it!” She laughs. “I’m literally talking about everything that men have sung about since the beginning of music.” Not that she minded – it proved her point. “The Stooges are my favourite band and Iggy is my god. If I’m not ruffling feathers, I’m not a true child of punk rock.”

Kesha leaves court, 2016. Photograph: Alo Ceballos/GC Images

She started something: soon Miley Cyrus became the twerking, tongue-lolling Miley Cyrus, Sia’s self-obliteration anthems reigned and Icona Pop’s I Love It (“I don’t care”) gave a generation its soundtrack. But 10 years on, pop has gone dark, its stars battling anxiety over political and environmental apocalypse. While Kesha isn’t surprised, she still thinks escapism is a noble pursuit. “Since the beginning of making music, I wanted to make people happy.”

Though she has had to redefine her own version of escapism. She has alleged that Dr Luke repeatedly told her that all she was supposed to be was fun, and that he limited her music’s emotional reach to capitalise on this image. Meanwhile, she stated in legal filings, he put her “under immense pressure to starve myself”, an endeavour that she says nearly killed her. She went to rehab for an eating disorder in 2014 and ditched the dollar sign from her name. These days, she doesn’t care how anyone thinks she looks: “My body, my business” is her abiding philosophy.

Understandably, she doesn’t care if anyone thinks that her return to pop is “inauthentic”. She avoided Auto-Tune and rapping on Rainbow because it didn’t feel right. Both are back on High Road. “And the beauty of it is that it was under my consent,” she says pointedly. She has always wanted to be more involved with music production, and recalls a cross-country road trip with her brother in her teens: she was making beats in the sweltering car, only pausing recording to open a window so they didn’t faint.

Luke gave her little creative control. She executive-produced Rainbow and High Road and her new collaborators have to respect her assertiveness, but being respected in the studio is still not always a given. “I’ve realised it’s OK to have boundaries, to have an opinion and to know what you want,” she says. “And it doesn’t make you a bitch.” While she prizes her authority in the studio, vulnerability has become a survival mechanism. “I spent a lot of my career and life thinking the way to protect myself was to be strong: I don’t give a fuck, you can’t hurt me,” she says.

But to witness the music industry laud her emotional honesty sometimes felt like another kind of expoitation. As part of the 2018 Grammy awards’ support of #TimesUp, Kesha performed Praying, backed by female musicians including Cyndi Lauper and Camila Cabello. She wept at the end. It was moving, but left a bad taste: a woman exposing her pain for the industry that allegedly enabled it, on a night where only one woman won a major award and the Grammys president suggested women “step up” if they wanted recognition.

Kesha’s lasting memory of the night is one of solidarity, “getting a giant hug from all these people that the media had previously pitted against each other. It was us saying no.” She considers my perspective. “It’s interesting because I was putting a very traumatic experience on display, but it was something I consented to. I was also terrified. But if something terrifies me, I feel like it may be important. Even if it sounds like utter hell and I just weep on the microphone, at least I tried.”

The #MeToo movement saddens her. “That enough people have been assaulted and treated poorly that there has to be an entire movement,” she says. She has no idea whether things have changed for younger, apparently freer peers such as Billie Eilish “because you never really know what’s going on behind the scenes. Because for a long period, people had no idea what was going on behind the scenes with me.”

The backdrop to the revelry of Kesha’s fourth album is ongoing legal strife: her second appeal against Dr Luke’s defamation case was denied in October; the case is ongoing. To cope, she says she has to avoid living in the past, or thinking too much about the future. “I truly feel like I’ve been through the shit and I have earned my happiness back,” she says emphatically. “I have God only knows the amount of therapy bills and meditation apps and transcendental meditation retreats.” She thrusts her right fist open in emphasis, revealing an eye tattooed on her palm.

But she hasn’t softened. In May, she attended a Grammys event wearing a diamante muzzle to protest against Alabama’s abortion ban. She didn’t anticipate a renewed assault on reproductive rights when she was singing about sex so freely 10 years ago. “It’s really archaic,” she says. She describes the era when American iconography – the dollar sign and flag – littered her work as “a very different time”. It was subversive, but also a bit patriotic. “Obama was president. We agreed upon not everything, but a lot of things.”

She would be unlikely to wear the stars and stripes today. “Very basic human rights – women’s rights, trans rights, gay rights, gun control – are being challenged and ruining people’s lives. The basis of my constitution is all humans should be treated equally and lovingly.” She sighs. “Musicians used to be the rebellious ones. But now I feel an overwhelming responsibility to be as empathetic and kind and loving and as safe of a place as humanly possible for people.”

She thinks back to staging her first cruise in February – it sailed from Florida to the Bahamas and saw her play to fans alongside other acts including Betty Who, Girl Talk and Big Freedia. She had no idea what to expect and was moved by her fans’ community spirit. While often “totally fucked, walking around naked”, they looked after one another.

There was one guy she’ll never forget, who was paralysed from the neck down. “The other fans were helping him dance with his arms because he didn’t have control over them, and putting glitter in his beard,” she says. “It was so beautiful to see people being so kind and understanding and allowing each other to be exactly who the fuck they wanted.” Here was what defined her, a reclaimed kingdom built on debauchery and respect.

High Road is released on 10 Jan 2020 on RCA.