It begins like any other daring escape mission: a packed bag, a methodical plan gone slightly awry, split-second brushes with danger, a narrowly avoided exposure. But Esther Shapiro, portrayed by Shira Haas in the lead role of Netflix’s new miniseries Unorthodox, is neither secret agent nor jailbird. She’s a Hasidic Jew in the Williamsburg neighborhood of Brooklyn, and she’s making a break for Berlin. If she’s fleeing a prison, she’s only doing so in the most strictly metaphorical sense. For the past year, Esther has been suffocating in a loveless arranged marriage and, at age 19, she wants a second chance while she’s still got her youth.

It sounds like ready-made human drama, but Deborah Feldman really lived it. She detailed her time in New York, her risky departure from the derech (a Hebrew word meaning “path”), and her personal reinvention in Germany with the memoir Unorthodox: The Scandalous Rejection of My Hasidic Roots in 2012. A teenage mother, she severed ties with her husband as well as the repressive patriarchy he came to represent, and eventually took advantage of the German citizenship afforded by her great-grandfather to settle in Berlin. She enrolled her son in the local school system, and that’s how she came to meet Anna Winger.

Like her, Winger was raising a child after coming to Berlin from faraway places. Winger had spent her youth hopping between Massachusetts, Mexico and Kenya with her anthropologist parents, ultimately finding a home on the same terms as Feldman.

“We’d talked a lot about the experience of being Jewish in Germany, and how there are common themes throughout,” Winger tells the Guardian over the phone from her home in Berlin, as a youngster’s voice eagerly anticipates afternoon bagels in the background. “Dislocation, a reason for coming, grappling with history, the metropolitan New York-ness of Berlin. There was a lot of common ground we’d found in normal conversation. The show, in a funny way, became our way to build out from those talks.”

Winger had created Deutschland 83, a hit TV series tracking the movements of an East German spy on the western side of the wall during the cold war era, and she recognized potential for a new project in Feldman’s extraordinary journey. “As someone who’s an outsider, my whole body of work in TV speaks to Berlin’s history and identity in one way or another,” Winger says. “I’ve lived here now for 17 years, and I think that one of the things that makes the city really striking is how layers of history exist simultaneously. My other show takes place in divided Berlin, with a spy going from East to West. We also have two worlds in Unorthodox, with a specific vision of both Berlin and New York.”

A considerably greater distance separates the Jewish enclave of Brooklyn from Esther’s refuge across the Atlantic, and Winger (along with co-creator Alexa Karolinski and series director Maria Schrader) required some artistic license to traverse it. The real Feldman remained in New York for some time after going OTD – that’s “off the derech” – while her avatar Esther hightails it directly out of America. For the sake of an arc-based narrative, Esther gains a musical motivation, pursuing acceptance to an elite orchestral and choral program. “There’s a real music academy called the Barenboim-Said Akademie where Jews and Muslims play classical music together, like a whole utopia,” Winger explains. “We were inspired by this idea, as the sort of institution that could only begin in Berlin.”

Feldman’s story had everything except a villain, so Winger shifted a portion of the four episodes’ perspective to Esther’s husband Yanky (Amit Rahav). Because he’s a real schlemiel (a Yiddish term referring approximately to the kind of guy who’s always spilling his soup) and intermittently sympathetic, Winger invented the harsher Moishe (Jeff Wilbusch) as a partner on the trip to retrieve Esther. His presence implicitly tacks a “by force, if necessary” on to the previous sentence. “Deborah gave us a lot of creative freedom,” Winger says, “but she was also excited about us coming up with something that speaks to present-day Berlin, which doesn’t appear in the book.”

Shira Haas stars as Esther Shapiro in Unorthodox. Photograph: Anika Molnar/Netflix

The city, a meeting point of the past and future for modern Jewry, emerged as the linchpin of the show’s conflicted perspective on religious identity. The memory of the Holocaust has a more palpable presence there than in any American city, but Esther’s multicultural group of new friends take more interest in clubbing than visiting memorials to genocide. She’s likewise torn between independence and reverence, rejecting the strictures of her Satmar sect even as she maintains a deeper, broader relationship to the Jewish faith. Her connection to Judaism forms an integral part of her notion of self, and she’s defensive of something most outsiders can’t understand. For Winger, gaining insight on the insular and exclusive world of Hasidim was a must.

“The first person we hired was this incredible guy, Eli Rosen, who was our Yiddish translator and cultural consultant,” Winger recalls. “He was a cantor before he left the community, and we had him on set every day working with the actors and the language. It’s not just that it’s Yiddish – it’s that there are 13 or 14 different kinds of Yiddish, and we needed everyone speaking the right dialect, which is a Hungarian Yiddish mixed with some English. It’s a very particular patois that they speak in Brooklyn, sometimes just from neighborhood to neighborhood. You might say something a bit differently in Borough Park than you would in Williamsburg. Hyper-localized.”

She also tapped actors from New Yiddish Rep, a New York theatre company with a healthy membership of OTD twentysomethings and thirtysomethings. “We met people, went to homes, and learned about their individual journeys,” Winger continues. “Jewish culture is almost like a spectrum from orthodox observance to secularism, but there’s always more uniting us than dividing us. If anything, that should be the message of the show.”

These collaborators provided a way into the Yiddish tongue; like many present-day Jews in the west, Winger heard her grandparents use the occasional slang but never learned it herself. (Mastering German, English and Spanish kept her plenty busy.) The language now stands as a link to a rich vein of heritage that must be consciously maintained in order to survive.

Esther Shapiro escapes her loveless marriage for Berlin in the Netflix series Unorthodox. Photograph: Anika Molnar/Netflix

“Doing this in Yiddish was part of the project from the beginning,” Winger says. It was the language of literature and theatre. It’s been preserved by the religious community, and the Hasidim are the only ones that speak it on a daily basis. There were about 10 different people involved with this project that came from the community, in one way or another … We thought it was important that everyone playing the Hasidic characters actually be Jewish, because we wanted the audience to have a familiarity with the language by the time they’ve seen the episodes, even if it’s just an emotional familiarity.”

Unorthodox joins the Israeli series Shtisel in Netflix’s limited library of Yiddish-language programming, but they both fit into a wider trend of forwardly Jewish programming on the small screen over the past few years. Esther’s uphill battle to obtain a divorce mirrors that of The Marvelous Mrs Maisel’s heroine Midge as she splits from her husband, while elsewhere, the Nazi-killers of Hunters get kosher revenge. The Plot Against America tackles antisemitism head-on every Sunday night at HBO, and back in 2017, hip studio A24 brought Yiddish to the big screen with Menashe, a drama set entirely within Borough Park.

“I have to say that while we were working on this show, we didn’t see ourselves as fitting into something larger than us,” Winger confesses. “I wish I had a better answer. It makes me feel strangely comforted to think that other people were also approaching these same issues in other creative ways.”

Steeped as Unorthodox may be in the particulars of Jewish life and culture, Winger sees Esther and Feldman’s twinned pilgrimage to freedom as a more primal act. Much in the same respect that the Jewish religion was founded on such core human values as resilience, togetherness and respect, so too can an account of a woman claiming agency in her own life operate on a universal frequency. Winger and Feldman came together as expatriates, and they believe audiences will be able to forge that bond just as naturally.

“It’s an uplifting story,” Winger says. “If you follow it through to the end, it’s about people finding their way in the world, defining their own derech, and that’s relatable to everyone. It’s a specific circumstance, but in that specificity, it becomes weirdly accessible … Anyone who feels a need to struggle for individuality against their community, they’ll find some of themselves in the show. I hope it’s a little bit cathartic, and leaves people who might like to start something somewhere else with hope. It’s all about renewal.”