I think as pp said, the key to this is the move.
I think I would take some time with him, and unpack how he feels. Is he missing friends? Is he finding it hard to fit in? Does he feel like an outsider because the slang/clothes etc are different here? So, my first step would be to listen, and empathise. Just so he knows you get it, it wasn't easy, you understand.
Step two, do something positive towards changing one thing in his new life. invite someone over or to the cinema. Join a club. just one positive step forward so he feels as if he is making progress on settling here.
Then, look at his organisation skills. What does he struggle with? Is he forgetting books etc? Not doing homework? How can you help structure him?
eg - bag packed night before. You have copy of his timetable on the wall, double check pe days if he has his bag etc, give him a morning check list.
Address the boundaries, but not as first thing. Put in some ground rules for how we speak, and have a low key but enforcable consequence for breaking that, eg name calling. Turn off internet for the rest of the evening for example.
Structure time at home, eg meal, homework, etc but build in chill time. What did he used to do after school? Is he struggling with not being able to hang out with his friends?
Finally ask to go in a talk to school. Be clear, this is new behaviour, ask them to look past the detentions and say what they think is going on. Is he happy? Is he struggling with friends? Is there some bullying going on?