Allison Moore joined the Maui Police Department when she was 23 years old and quickly climbed the ranks to narcotics vice cop. By day, she conducted investigations into big-time meth dealers and partnered up with the DEA, flying on helicopters looking for illegal drug activity. But nobody knew that she had a secret — she was a meth addict herself. Moore’s memoir, “Shards,” comes out April 22. She tells The Post’s Kate Storey her tale . . .

It’s 6 a.m. and I’m parked in my patrol car on a dark, quiet, suburban street in Wailuku, Maui. Dressed in my crisp blue police uniform and my bulky green vice vest, with my bright blond hair pulled into a ponytail, I get out of the car with my team of two fellow officers to apprehend my target — a middle-aged Filipino meth user.

We bang on the door and announce ourselves: “Police. Open up!” Nobody answers, so the officer in front of me kicks in the door and it bursts open. With my Glock 27 raised, I follow behind as the male officer checks each room. When we get to the bedroom, it’s locked, and I step up and yell for the man to let us in. When he doesn’t, I kick in the door and see him sitting in the corner. I cuff him, and take him in to the Maui precinct.

I’m only 27 years old — a rookie vice — and today is one of the first search warrants I’ve executed. They put me on the job because I’d quickly become known as the narcotics specialist on the force — taking down big dealers on the island.

That night I go back to my apartment — a simple, neat one-bedroom with a view of the pool and, beyond that, the serene, blue-green ocean. I sit on my couch, reflecting on my big score that day.

Then I take out my pipe and stash of meth and light up.

I’m a cop, a meth addict and a hypocrite — I’d been high that morning when I arrested a man for the offense I was guilty of.

Nobody knows about my shameful double life, which will eventually destroy everything I have.

I moved to Maui when I was 21 years old. I’d fallen in love with the island when I visited with family during my childhood. So in 2002, I headed to Hawaii and enrolled in classes at the community college.

I was so enamored with the Maui people that I decided I wanted to give back to the community and, on a lark, applied to be a police officer.

Much to my surprise, I passed the interviews, and in 2004 became a member of the 63rd recruit class at the Maui Police Department (MPD).

I loved my job and worked myself ragged, regularly logging 12-hour days. So when I fell for a fellow cop, a handsome married Hawaiian man named Keawe, our illicit affair actually fit into my lifestyle.

Keawe and I would meet early in the mornings before our shifts or on weekends when his wife and kids were away. I knew what I was doing was wrong, but the passion between us kept me captivated.

About a year into our relationship, I got news that would change everything: I was pregnant.

When I told Keawe, I wanted him to tell me he’d leave his wife and start over with me, but instead he simply said: “We can’t.”

Later that week, I lay on the bed alone for an abortion when the ultrasound technician asked, “Are you terminating both?”

I was carrying twins.

After the abortion, I fell into a deep depression. I began to realize Keawe was just using me and I hated myself for staying with him.

A few weeks later, I was working patrol when another officer came back from a drug bust. He dropped a bag of meth, tied up neatly in a little baggy, on my desk in the middle of the office for me to file a report.

Without thinking, in one swift, fluid motion, I tucked the baggy into the front Velcro pocket of my uniform. A few minutes later, when what I’d done began to sink in, I felt a wave of anxiety wash over me.

I carried the drugs around for the rest of the week. And on Saturday, my day off, I sat in my bedroom with the blinds drawn and stared at the baggy. I was so desperate for anything to make me feel better . . . and it would just be this one time.

I poured out a few of the clear, tiny crystals, and even though you’re supposed to smoke it, I snorted it. I felt it burn in my nostrils and my eyes teared up. But then, I felt the most amazing, ecstatic high I’d ever felt. My life felt livable; I felt happy.

That hit made me feel so good, I knew I had to do it again. For a while, I justified my using by buying my own drugs — not stealing them from my busts. I couldn’t get meth in Maui because the dealers knew who I was — I was the enemy, the narcotics vice. So, once a month, I’d fly to Honolulu and stay for a few hours — long enough to drive around looking for a prostitute to lead me to her dealer and get my supply. I was so brazen, I’d carry the drugs in my pants pockets when I boarded the plane home. Because I had a badge, I felt invincible.

Being a single workaholic before I started using, I’d stockpiled a nice little nest egg of about $35,000. In a few months, that was gone on plane tickets and meth.

So I began skimming drugs from work. Before entering it as evidence, I’d pocket some for myself.

By this point, I was using about a gram a day, and soon I was unable to function at work without sneaking into the bathroom to use.

I tried to hide the effects of the drugs by taking body-building supplements. I’d binge on fast food even though meth took away my appetite, and I even bought colored contacts to mask my dilated pupils.

Keawe, whom I was still seeing, and my co-workers began to comment on my obvious weight loss. In the time I’d known them, I’d lost about 20 pounds from my 5-foot-9 frame, and, in spite of my efforts, I was getting the gaunt “meth face.” But nobody asked me if I was using. I wasn’t a picker and didn’t get sores or lose my teeth like some meth users.

About a year into my addiction, a co-worker of mine was asking me about my appearance. “Do you have cancer or something?” he asked, half-joking.

But, on the spot, I realized he’d just given me the perfect excuse. “Yes,” I said, looking him in the eye. “I have ovarian cancer. That’s why I look like this.”

As soon as I said it, I knew my life was over. I’d stepped over a line and I knew I wouldn’t be able to go back. But now I was free to disappear — under the guise of getting treatment — to get high.

I told my sister I was taking some time off and flew to her house in Seattle, where I reached new lows. I holed up in her guest bedroom with my pipes and needles (I’d progressed to smoking and shooting up) — with her 2-year-old and 8-month-old just down the hall.

I went on Craigslist looking for men with whom I could trade sex for drugs. And when I realized those trades weren’t getting me enough meth, I prostituted for money, which I’d use to get ice from dealers.

When my sister asked why I was so withdrawn and sickly looking, I blamed stomach problems.

One day I had a call from my sergeant back in Hawaii. He was phoning to tell me one of my confidential informants had tipped off my partner, leading to one of the biggest drug busts in MPD’s history.

“I’m so proud of the work you did to make that happen, Alli. I wish you’d been there to see it all pay off,” he said. As I tried to focus through my high, he asked: “Are you going to be able to come back soon?”

“No,” I said. “I’m still in treatment.”

“Well, there’s no rush, because the other officers have donated their sick leave, so you can take as much time as you need,” he said. More than 80 of my fellow officers had stepped forward to help me, sacrificing their time off so I could get better.

When I hung up the phone, I thought to myself: “I have got to stop this. It has to end here.”

That lasted for about 30 minutes — until my next craving.

My good friend from work, Erin, called later that month to tell me she was arranging a fund-raiser in my honor, to help me pay for the chemotherapy. I was livid with her.

There was no way out of the lies I’d built around myself. That’s when I began considering suicide.

I’d been staying with my sister for more than a month, and in my fog of getting drugs and fielding questions from my family, I began spending more and more time with a dealer in Washington I’d met on Craigslist.

He was a white, middle-aged man with a shaved head and a strong build, and he was fixated on me becoming his girlfriend. Because he was giving me pure, strong meth for free whenever we’d meet up to have sex, I went along with it.

After a few weeks, the dealer told me I was his and I could never leave.

“I know you’re a cop back in Maui,” he said, threateningly. “I have a tape of us having sex and smoking meth, so just remember that if you ever think about leaving me.”

At first I didn’t believe him, until I began noticing little cameras around his house and dozens of wires leading into a room. I was trapped. For six weeks, I was held captive while my family thought I was back in Maui. I was regularly beaten and raped by the dealer. Once, after a fight, he brought a string of men to the house to rape me.

He kept me so high that I wasn’t in a clear enough state of mind to run away or call for help. The dealer told me he was in contact with my family and they wanted nothing to do with me. I planned to die in that house.

One afternoon, we got a knock on the door, and I saw two familiar faces — internal affairs officers from the MPD. My lies had come unraveled when Keawe called my sister looking for me and they searched my home in Maui, finding my drug paraphernalia and the dealer’s name and address, which I had left on an earlier visit.

I felt relief — like seeing a long-lost brother. But in my twisted mind, I felt too scared to run into their arms. Somehow, I thought I would only be safe with the dealer.

“Is this man keeping you against your will?” one of the officers asked.

“No,” I lied. “I want to be here.”

My own personal hell continued for a few weeks, as the dealer punished me by withholding drugs for having contact with the outside world.

One morning, desperate for a high, I saw the corner of a baggy poking out from an air vent. “This must be where he keeps the drugs,” I thought.

I found my badge, my driver’s license and my cell phone, which the dealer had hidden. Seeing artifacts from my old life reminded me of how things used to be. I had an epiphany — I wanted to live.

Somehow I managed to guess the dealer’s computer password, and I sent my mother an e-mail to pick me up Friday at 3:45. I knew the dealer would be out on a job then.

When Friday came, I took a hit, packed my things and ran out of the house, and, like an angel, my mom appeared. I jumped into her car.

“I’m so sorry, Mom,” I said, shaking, rocking back and forth.

“It’s OK,” she said. “You’re going to be all right now.”

She immediately took me to rehab in Taos, NM. I spent four weeks in an in-patient rehab and four months in a sober living facility.

I was diagnosed with PTSD and had constant hallucinations replaying what happened in the house.

After moving back home with my mom in New Mexico and cutting off contact with Keawe, I was paralyzed by my fear, spending days curled up on the couch, watching cartoons.

And then the inevitable happened. My mom convinced me to go out to get a sandwich with her and a cop car followed us home.

“I’m going the speed limit,” my mom said. But I knew they were there for me.

As they cuffed me and questioned me in the back of the cop car, they explained that the Maui Police Department was charging me with 25 drug-related felonies.

My mom stood in the driveway, white as a ghost.

They took me back to the Albuquerque precinct, and two weeks later, I was transported in handcuffs and leg irons to Maui to be arraigned. I was relieved the lies were behind me, but I was terrified to see my old friends at the station.

When I got to Maui, the booking officer gave me a big hug, which made me feel worse. I’d lied to these people and they still supported me. Luckily, I didn’t see Keawe or Erin.

In August 2010, I pleaded guilty to the 25 charges, including deceiving the department, tampering with evidence, drug possession and forging doctors’ notes. I spent a year in prison for my crimes.

Today, I live with my grandmother and two mastiffs in Albuquerque. My probation ends in October 2015.

I’m 33 years old and I’m telling my story now because I want to get the truth out about addiction and how ugly it really is. I’m not the only cop who has fallen to temptation. There are entire rehabs dedicated to law enforcement officers.

I co-wrote a book about my story with Nancy Woodruff, and I think the process of admitting my truth has helped keep me sober. “Shards” comes out April 22, and I’ll be donating a portion of the proceeds to Catch a Falling Star, an organization that offers resources to law enforcement officers who suffer from an array of health afflictions.

I’ve reached out to some of the officers back in Maui, but they’re not ready to talk to me yet, which I understand. I’m taking small steps.

I work three part-time jobs — as a caretaker, organizer and maid — and I’m relearning what my passions are. My happiest times are with my family, who have forgiven me for all of the lies and terrible things I did.

I still have meth cravings, even though I’ve been clean for four-and-a-half years. And I have nightmares about the dealer every single night. I see a therapist three times a week, three hours a visit.

I try not to look too far ahead into the future, but my goal is to learn how to accept myself. My biggest regret besides hurting the people that I loved so much is that I didn’t love myself.

Everyone’s name in this story except Allison’s has been changed.