A former detective with the Bakersfield Police Department pleaded guilty today in federal court to possessing methamphetamine with the intent to distribute.