Ariel Levy wrote one of October’s top bestselling books in the US, but you may not know it. After all, her name is not on the cover.

The American journalist has written some of the most compelling profiles in the last decade as a staff writer for the New Yorker, and she specialises in writing about interesting women. She has profiled Edith Windsor, the plaintiff who won a landmark case in the fight for gay marriage in the US; Diana Nyad, who, at the age of 64, was the first person in the world to swim from Cuba to Florida; and Julia Louis-Dreyfus of Veep and Seinfeld fame.

“I have always been interested in the question of ‘what does it means to be a woman’?” says Levy. “The thing I’m always looking for is the counterintuitive.”

Now she has teamed up with Hollywood superstar Demi Moore, ghostwriting her memoir, Inside Out. The book, released earlier this month, has surprised readers with its candid revelations about Moore’s career, relationships and her chaotic childhood.

Levy recognises how incongruous this partnership seems. Speaking to the Guardian from the US ahead of her upcoming visit to Australia for the Broadside festival, she laughs when asked about her relationship with Moore. “If you had told me five years ago I would be good friends with Demi Moore, that she would be someone I could really properly talk to, I wouldn’t have believed you. The most surprising thing was that we could relate at all.”

Levy’s involvement in the book began after Moore’s publisher read Levy’s own 2017 memoir, The Rules Do Not Apply, and thought the two shared some overlapping experiences – including the experience of miscarriage. “Her editor read my memoir and had a feeling that we would get each other, and we met and we did,” says Levy.

I have become a better person – better at being alive – since I’ve had my arse kicked Ariel Levy

Moore was also grateful for the help of a professional writer, telling the Wall Street Journal: “I wanted it to be a good book, but I didn’t feel like my skill set lent itself to be able to do that.”

The process involved many conversations with Moore at the actor’s homes in California and Idaho, and then turning the transcripts into a book written in her voice.

“I spent a lot of time with [Moore], so I got a feel for how she communicates. The book does sound like her, not like me. I did that by using her words. A lot of what’s in there is direct quotes. It’s her language and it’s her story. I was a midwife.”

The construction of the book is not dissimilar to Levy’s, beginning with a dramatic moment before rewinding and telling the story of how Moore got there.

“It’s pretty raw,” says Levy. “She really went for it. She didn’t take anything out. I think she really wanted to communicate. She was sick of people trying to tell her who she should be.”

Journalist Ariel Levy: ‘I was sick of myself.’ Photograph: Annabel Clark/The Guardian

After writing The Rules Do Not Apply and talking about her own life for months on end while on an international tour, Levy was keen to have a break from her own story. “I was sick of myself,” she says.

Levy’s own memoir is a harrowing read. In it she describes how she lost her marriage, house and baby in quick succession, and how it felt, at mid-life, to not have the life you want. It could be described as a second coming-of-age memoir – about how the real work of adulthood begins with loss.

“There are very few people that I’ve met who have not had a trial by fire,” says Levy. “I don’t know if it makes them a better person, but I have become a better person – better at being alive – since I’ve had my arse kicked.”

Now, “everyone tells me about their miscarriages. It’s a privilege when people tell me about this really personal, animal, primal experience of being a woman. I like that people tell me about that stuff. It’s a deep way to connect.”

Levy has also made her first foray into podcasting, hosting Broken: Jeffrey Epstein, a detailed exploration of the sex-trafficking scandal that has implicated so many rich and powerful people.

“To me what’s interesting is the web of humanity involved – all these lives intersect. You had Trump, Clinton, Prince Andrew and then all these girls that work at McDonald’s and live at West Palm Beach, which is a really hard place. Girls from a certain type of background, girls who were poor, [Epstein] just walked on,” she says.

Levy is skilled at seeing patterns of patriarchy and sexism that lie under the surface of everyday life. Her 2005 book, Female Chauvinist Pigs, explored how early 2000s raunch culture sold sexual objectification back to women as female empowerment, often resulting in women objectifying themselves.

She believes that things have changed since then – but not for the better. “I think it’s a more dire time now.”

Her own life, though, is finally back on a more even keel. She is married to the South African doctor she met in Mongolia, who treated her when she had a miscarriage while on assignment for the New Yorker. The pair live most of the year in New York state on Shelter Island and South Africa “for a couple of months of the year”, where Levy’s stepsons attend university.

“This is a really nice time in my life right now.”

• Ariel Levy will be a guest at Broadside festival, held in Melbourne on 9 and 10 November