Hancock is a very rare case of a ghoul being created after the Great War. He used an abundance of experimental drugs that eventually decayed his skin enough to ghoulify him. This is the explanation he gives for his appearance in Fallout 4 despite the story going against established Fallout lore.