If you have had and used it for a long time, it's happiness should be pretty high. If That is the case, then that is why you cannot release it.
A Pokemon with high Happiness cannot be released.
Source: Bulbapedia/ Release
Go to Route 213. There is a small house on the beach. There, you will find Dr. Footstep. He will rate your Pokemon's happiness.