A former Queens physician whose license was revoked for negligently writing prescriptions in 2013 is now facing charges after allegedly selling amphetamine diet pills out of his office to a woman with heart problems who later died from a heart attack.

The 65-year-old woman was a patient of Steven Bernhard, 66, for many years before she received diet pills from the former doctor in March 2015, according to authorities.

Prosecutors said the pills should never have been prescribed, citing her existing heart condition.

The former doctor is also accused of using his revoked medical license to order nearly 1.5 million prescription amphetamine pills from a distributor in violation of his license suspension, and writing nearly 20 illegal prescriptions for painkillers for friends and family.

Investigators said they discovered Bernard would see dozens of patients a day, despite not having an active license.

“If the allegations are true, Mr. Bernard has flagrantly violated the oath of his former profession,” New York State Health Commissioner Howard A. Zucker said in a statement. “I am very saddened by the death of the 65-year-old woman, whose demise was hastened by Mr. Bernhard’s reckless and immoral behavior. I wish to extend my heartfelt condolences to her family.”

Bernhard is charged with the unauthorized practice of medicine, fraud and deceit related to a controlled substance, reckless endangerment and several counts of criminal possession of a controlled substance.