A 33-year-old woman died in NYPD custody in Brooklyn Central Booking, cops said Monday

Zamiqua Miller, a Brownsville resident, was found dead in the holding area for suspects at Brooklyn Criminal Court on Schermerhorn St. in Downtown Brooklyn about 6 a.m. Sunday, according to cops.

Her death may have been the result of a medical episode or overdose, police sources said. The NYPD Force Investigation Division is probing what happened, as it does with all deaths in custody.

Police arrested Miller just after 10 p.m. Friday for misdemeanor drug possession after allegedly catching her carrying several envelopes of heroin, as well as crack and a crack pipe, sources said.

She had warrants out for failing to show up for past court appearances so cops put her through the system, taking her to Central Booking for arraignment.

The next morning, she appeared to go into drug withdrawal and was taken to Brooklyn Methodist Hospital about 6:30 a.m. Police took Miller back to Central Booking later that day, but she was soon back in the hospital a second time for the same symptoms, sources said.

The hospital discharged Miller at 1:26 a.m. Sunday and police took her back to Central Booking one last time, where she was found her lifeless in her holding cell about four-and-a-half hours later.

Miller had a lengthy criminal history, mostly for retail thefts, sources said. She had 23 prior arrests on charges including drug possession, burglary, robbery and petty larceny, the sources said.

She also had two open cases in Queens, for shoplifting detergent and diapers at two separate Walgreens, sources said.