Before you can treat this as a behavioral problem, he needs to be checked to make sure he doesn't have a medical problem such as an urinary tract infection. When a cat has a UTI, they will not go in the litter box because they associate this with pain that they're having when they try and urinate. If he gets a clean bill of health, then it could be a territorial thing. Please have a vet check soon. If he would have a blockage it could be fatal.