Any time a cat that has always had good litter box habits starts doing things differently, you need to have them checked. My best guess is that he has a urinary tract infection and is going outside the box because of that. Ordinarily you would think he would be urinating outside the box, but occasionally, they will deficate outside and urinate inside. The constant licking is also indicative of pain. Please get him into your vet today. With males, they can develope blockages very quickly and the bladder can rupture. I feel he needs to be checked today and started on antibiotics so it doesn't progress to the point where he needs to be catheterized.
Please let me know if I can help further.
Please Press ACCEPT if my answer helped solve your problem.
Lori McLaughlin
Your veterinarian should ALWAYS be consulted first and foremost when your pet's welfare is at stake.