Have you brought him to the vet for this yet? Have they run any tests? Usually when they don't use the litter box it is not a behavioral problem but a sign of something physical. It hurts them to use the litter box and they
associate that pain with it, so they find other places to go. I have recently learned that basically every change in behavior can be a sign of something physical not being right.
My family has had two cats with urinary crystals. Unfortunately with the first cat, we thought it was a behavioral problem. He seemed completely fine and the only thing that was different was that he would "spray". Eventually
the crystals caused a blockage, we did have surgery to remove the blockage, but the stress of the surgery was too much for him and he passed away that night.
The cat my parents got after him also developed crystals. But this time my mom knew a lot more about it and at the first sign that something was wrong brought him to the vet. In his case, he was excessively licking himself. Now
he just has to be on a special food and she just makes sure that he is using the litter box everyday since sometimes stress can cause these type of things to reoccur. He has been completely fine for four years now, so if you catch it early
enough, it's definitely treatable.
Feeding wet food will help, but some cats are just more predisposed to develop crystals.
Hope you get to the bottom of it soon and everything works out.