A former Harford County detective was sentenced to 36 years in prison for crimes related to sexual exploitation of children.