Cat troubles!

Cooper
I need some help. My fiance and I have a 3 year old male cat who will not use his litter box and pees on the carpet. The funny thing is he only does it when my fiance is at home. While he is at work, Mikey uses his litter box. Could he be doing this because he thinks he is going to be replaced by our son that is due at rhe end of October? My fiance is thinking about getting rid of him, which I don't want he to do, but we can't afford for him to pee on the baby's things.