Did you get him from a pound or shelter?
Maybe he has "sad" memories that have to do with a fence?
(I hope not though)