A former Maryland Department of Health police captain has pleaded guilty to two counts of misconduct in office, after prosecutors said she attended university classes during her shifts.