Dexter's adopted father, Harry, saw he had the affect of a psychopath (a flat or blunted affect). Harry was also a cop who saw some bad guys escape justice so he decided to give Dexter a code to fit in with normal society and turned him loose on the bad guys who escaped justice.
Sadly, when Harry saw that his son was still a monster, albeit one with a code, it was too much for him and it hastened his death from some disease, I forget what. Probably cancer.