Freedom and increased attention are probably the motivators for your son’s desire to live with his father. What is important is that you and your ex-husband both have established rules that are enforced in both of your homes. The rules may not be exactly the same, but they exist.
Your son has to learn that following the rules is important no matter where he is. This realization is a struggle for many children, but eventually they realize that part of life is following the rules. This comes with maturity and through discovering it on their own.
If he is going to be safe at his father’s, perhaps this is an option. However, if you don’t feel that his dad’s is an appropriate home for him, then you need to make the decision soon. Either way, let your son know that your rules and expectations are not going to change regardless of where he lives. You will still be part of his life and expect him to behave in a way that a mature, responsible young man does.