Before my first book was published, no one I work with knew that I’d spent my early 20s as a professional dominatrix, or a heroin addict. Why would they? It is not customary to indicate on your CV that, prior to your position teaching creative writing to 19-year-old students, you were employed by a dungeon. Most people, even those sober for many years, do not broadcast their history of illegal drug use. Most do not write memoirs about these experiences, either. But I did.

The week of the book’s publication, in 2010, I gave a radio interview. It was the first time I’d spoken about my experiences as a dominatrix. From “What was it like to tie someone up?” (from which I segued into the topic of power dynamics) to “Do you think publishing this book will affect your job chances?” (I said I wasn’t concerned, though in truth I wasn’t so sure), I revealed thoughts that had been private for nearly a decade.

The day after the interview aired, I walked through the college north of Manhattan where I had been teaching for a couple of years. As I passed her office, the dean of liberal studies, my immediate superior, called out to me: “Melissa!”

I stopped in her doorway and waved, my pulse quickening.

“I heard you on the radio yesterday,” she said.

She hadn’t asked a question, so I just smiled awkwardly, as a blush crept up my neck.

“Congratulations,” she said, after a pause. I knew that this required a response, but not what it should be.

Not only had I hidden my chequered past from my colleagues, I had not told my partner’s family the subject of my book. But we broke up shortly before publication date, so I never had to see their reaction when I appeared on the cover of the New York Post. I wore long-sleeved cardigans that covered my tattooed arms to teach my classes, even in summer. I didn’t regret my tattoos, nor my past, but I knew how these things were perceived. I didn’t want my students to imagine me tying men up, or dressing in sexy nurse costumes, or shooting heroin. I had been even more scared of facing an interaction like the one with my dean. My hot face and racing pulse as I stood in her doorway felt like proof that my fears had been justified.

What could I say? Should I apologise? But for what? I had written a book of which I was proud. Suddenly, despite my anxiety, I knew what to say.

“Thank you!” I responded, sincerely. I smiled.

She smiled back at me, and I think both of us felt relieved.

***

At 21, I had answered an ad in the back of the Village Voice: “Attractive young woman wanted for nurse role-play and domination. No experience necessary. Good $$. No sex.” I was a college student in creative writing, an aspiring novelist, an intern at a national magazine – and a heroin addict for the past three years. At 18, I had naively believed that my loving childhood and intelligence would safeguard me from the fate of other casual drug users. I had been a weed-smoking teen who graduated to cocaine and crystal meth by the time I was 17 and living on my own in Boston. But the “partying” I did with friends all receded once I started dating an older man who happened to be a heroin addict. Within months, I had a habit.

Three years later, I had learned the hard way that knowing better isn’t enough. I couldn’t think my way out of being a junkie. I had moved to New York from Boston for college, and to escape the boyfriend I told myself was the source of my troubles, but my heroin habit had followed me. Now I was using alone in my bedroom, in public toilets, in the junkyard down the street with local dealers. I had no boyfriend to blame. It was just me and my compulsion, which I had kept hidden from nearly everyone.

I spent my nights in elaborate costumes – nurse, police officer or leather-clad mistress

I had suffered through so many sleepless nights detoxing, promising myself never again. But I hadn’t been able to kick the habit, and I needed money. I was tired of restaurant work, and the job description of a dominatrix didn’t seem to conflict with my feminist politics the same way other sex work did. By definition, the role of dominatrix was empowered – wasn’t it?

And, for a while, the work was exhilarating. I excelled in school and at my internship, and spent my nights in elaborate costumes – nurse, police officer or leather-clad mistress – acting out the fantasies of strange men who paid $200 an hour to re-enact their childhood traumas, their most far-fetched desires, and to spill their own dark secrets.

I remember being in a dressing room walled with mirrored lockers, on an unmarked floor of a Midtown Manhattan office building. Reflected in the mirrors were the bodies of other young women who worked in the dungeon, all in various stages of undress: some in underwear, some in fishnets and tugging the corset laces of others. I was 22, and in my lap lay a college textbook streaked with pink highlighter. In my bag was a disposable syringe and bag of heroin – barely enough to keep my four-year-old addiction at bay for the evening.

Juggling these disparate realities gave me a swell of energy. It was this kind of tension that marked the adventurous life of a novelist, didn’t it? I was still scribbling in notebooks, on my laptop in the dungeon kitchen. I still managed good marks in my classes.

But by 23 I was no longer a student. I was no longer writing, or even reading. I dreaded going to work at that Midtown building. What had once felt empowering now felt humiliating. Even though there was no sex, I was still catering to the fantasies of strangers. There was no one who knew the full scope of my life. And I was so tired. I spent nights waiting by pay phones for my dealers, running the shower for hours while I smoked crack in the bathroom of my flat, and shooting up by torchlight so that my flatmates – my closest friends – wouldn’t know that I was even home. I knew I was an addict, and it scared me. The incredible loneliness was the most painful part of that life. I so desperately wanted to be found out, to be rescued from myself. I had begun to fear that my ability to keep my addiction a secret would cost me my life.

One night, I was shooting up with the phone cradled against my shoulder, in the hope that if I began to overdose, I might be able to dial 911 before it was too late – my usual safeguard. In that moment, I glimpsed the truth: I would die this way. My loved ones would discover the reality that I worked so hard to hide by way of my dead body. I shook inside, equally unable to imagine continuing as I was, or asking for help.

I came home from work not long after to find my best friend and roommate sitting at the kitchen table. My addiction had become impossible to hide. The track marks on my arms showed through the makeup I smeared over them, and neighbourhood crackheads knocked on our apartment door in the middle of the night, calling my name. I would spend days in bed detoxing, and claiming yet another round of flu, only to score again a few days later.

“I’m worried about you,” my friend said, and that was enough.

I nodded, and tears welled in my eyes. “I need help,” I said. “I can’t do this any more.” It took me another six months to get clean, and another year to quit my job at the dungeon, but that was the moment I admitted defeat. It was the hardest thing I’d ever done, and it saved my life.

‘A story that needs to be told, once acknowledged, does not recede back into the unconscious.’ Photograph: Caroll Taveras/The Guardian

In the small seaside town on Cape Cod where I grew up, I was the girl who wrote long, fantastical stories for my school projects and read a book while walking down the street to my bus stop. One of my favourite games was to bury household objects in the garden and draw elaborate maps to their locations. I would then hide the maps inside my books and delight in my secret knowledge. It didn’t matter if anyone cared what I’d hidden. While many of my female peers matured into fantasies about wedding gowns and motherhood, I read the biographies of writers and imagined myself holding court in Paris cafes. I preferred Colette to Jane Austen, finding novels about prostitutes, alcoholics and criminals more romantic than marriage plots. I was dreamy, secretive and strange, and mostly that was all right. I had friends, and straight As. Similarly, a decade later, if I was keeping up with my college classes by day, it did not seem to matter how I spent my nights. I didn’t foresee how the secrecy of that thrilling double life would come to choke me.

I never planned on writing about any of it. I was grateful to be clean and I wanted to get on with my life. As a graduate student, two years after crying at that kitchen table, I took a non-fiction class in which we wrote a short memoir. On an impulse, I drafted an essay about my time as a dominatrix. I told myself that no one but my teacher would ever see it.

“Do you have more material on this?” he asked after reading it.

“I have endless material on this,” I laughed.

“You need to write a memoir,” he said.

I laughed again. The idea of such exposure made my shoulders clench. But those pages had been the most urgent I’d ever written. A story that needs to be told, once acknowledged, does not recede back into the unconscious. It knocks and knocks until you open the door. So I spent two years at my desk, transforming my secrets into a story that made sense to me. It felt like fitting myself back to together.

Before he’d sent the book out to editors, my agent had asked me, “Are you sure you want to do this?” Without much consideration, I answered, “Yes.” Perhaps, if he had said, “Are you sure you want all of your colleagues, present and future, all your future partners’ families, your potential children, their teachers, friends, and friends’ parents to know that you were once a heroin-addicted dominatrix?” I would have thought longer about my answer. Though I suspect I would have given the same one.

I had needed to write that book in a vacuum, consciously to avoid considering how it would affect my relationships, both personal or professional. But shortly before the book was published, I sent copies to both my parents. My mother, a psychotherapist, called me the next morning at daybreak.

“Mom,” I said, “you were supposed to wait until you finished it to call me.”

“I did,” she replied. “I stayed up all night reading it. I had to know that you were going to be OK.”

My heart broke a little. If I could have given her an abridged version of the book, I would have.

I wondered if I had made a terrible mistake. But gradually I shed my secret self and the shame that came with it

“It was the hardest thing I’ve ever read, Melissa,” she said. “And it’s a masterpiece.”

My father and I didn’t speak for three months. Many of his most precious memories were revised – destroyed – by the accounts in that book. It took a few years for us to recover our relationship, though a stronger and more honest one emerged in its place.

Even my closest friends were dismayed. “I had no idea it was so bad,” many of them said. “Why didn’t you tell me?” To my friends and family, I think the book felt like evidence of their own personal failing: if I had trusted them more, I would have asked for help. I knew that wasn’t it. My instinct for secrecy was so old and so deep, there was nothing anyone could have done until I was ready to show myself.

But these reactions, however painful, were more expected than those I encountered at work. A few weeks after my awkward encounter with the dean, during a creative writing workshop, I gestured at a graph I’d drawn on the chalkboard.

“The art,” I explained to my students, “is not in how you cram every detail of your life story into your memoir. It is in how much you leave out.” I brushed the chalk off my hands. “Any questions before I move on?” A few students still jotted notes and some stared at the board. One young woman cautiously raised her hand. I nodded at her.

“What was it like?” she asked slowly, crimson rising up her cheeks.

My own temperature rose, though I kept my tone measured. “What was what like?”

“When you worked… with those men.”

For a moment, I stood frozen. This is it, I thought. I would have to simply walk out of the room and quit my job. I felt skin-crawlingly exposed. Maybe I was not qualified to teach them. Then I remembered that conversation with my dean. I had spent most of my life practising the skills I was teaching my students and I had written a critically acclaimed book. I knew I was qualified, whatever my past or who knew of it.

“I am always willing to answer your questions about transforming your experiences into literary art,” I explained to the student, “but not about my personal history. Does that make sense?”

The student nodded, mortified. I smiled to let her know it was OK and moved on with the class. A few minutes later, my own pulse slowed. The subject never came up again, though during office hours one week, that same student shyly produced a copy of my book and asked me to sign it.

Later that term, as I finished my lunch in the staff lounge, a male professor joined me. We nodded at each other congenially and he stirred his coffee.

“How’s the Intro To Lit class faring?” he asked.

“They’re fine,” I smiled. “Still struggling with these citations, though.”

“Well, I’m sure you’ll whip them into shape,” he quipped, and winked at me.

As his meaning sunk in, I blinked and wondered if I should laugh it off. It would have been easy to humour him. That was what he expected. I suspected that his intentions were good-natured, but the comment embarrassed me, and I wondered if, on some level, it was meant to. I did not smile. I furrowed my brow slightly and returned to my grading. I sensed his discomfort as he took another sip of coffee. A part of me wanted to rescue him, but I didn’t.

“Hey, I’m sorry about that,” he finally said, and sounded as if he meant it.

“Thanks,” I replied. “How’s your thesis seminar going?”

I could not spend the rest of my working life censoring parts of myself

There were other awkward encounters. Moments when I wondered if I had made a terrible mistake. But gradually I shed my secret self and the shame that came with it.

Four years after my first book’s publication, I had an interview for my current job, as an assistant professor at a university south of the city. I had already decided that while I didn’t need to read the most salacious passage from my first book, I also didn’t need to avoid mentioning it. I could not spend the rest of my working life censoring parts of myself.

When I shook the hands of my potential colleagues, my tattoos peeked out from my quarter-length sleeve cardigan. Over lunch, I didn’t censor the fact that my partner was a woman. And when a member of the search committee congratulated me on my radio interview, I met her gaze and thanked her.

A few days later, they offered me the job. I hung up the phone truly happy. My past life was no longer crashing into my present one. Rather than a liability, my past was a fundamental part of who I had become – personally and professionally.

Now, more than a decade after I quit the dungeon, and nearly 14 years sober, I have no regrets. Surviving those experiences, and later writing about them, taught me about art and recovery. I have received letters from hundreds of strangers who felt similarly alone in their secrets, who found some solace in my story. I am closer than ever to my family. The honesty that I risked on the page has taught me how to be more honest in my life.

• Abandon Me by Melissa Febos is published by Bloomsbury at £16.99. To order a copy for £14.44, go to bookshop.theguardian.com or call 0330 333 6846.