The doctor is in… prison.

Dr. Syed Imran Ahmed was sentenced to 13 years behind bars for bogus billing that reaped him millions.

Brooklyn Federal Judge Dora Irizarry administered the tough medicine Wednesday, ordering Ahmed, 51, to pay the feds more than $14 million in restitution and forfeiture, in addition to serving his prison time.

Prosecutors said Medicare paid the weight loss and wound treatment specialist $7 million for procedures, many of which he didnt perform.

Brooklyn surgeon in Medicare billing scheme preyed on ‘elderly’

Ahmed was convicted of health care fraud, money laundering and other crimes at a July 2016 trial.

Among his bad billing practices: He claimed he did 600 procedures on one elderly woman. The doctor, who had offices in Brooklyn and Long Island, treated Medicare like a personal piggy bank, Interim Brooklyn U.S. Attorney Richard Donoghue said.