For some reason, your cat has decided that the litter box is an unpleasant place to be. This is a common cause of cats abandoning the box. Change back to the litter your cat used before. Another reason is new scents in or around the box. Make sure you clean out the litter box daily and any cleansers you use to wash out the box are mild, and do not contain ammonia and are thoroughly rinsed away.
All animals develop preferences as to where they like to eliminate.
These preferences may be established early in life, but they may also change overnight for reasons that we do not always understand. If your cat often reaches out and scratches the carpet after using the box, he may come to prefer the carpet over the litter box. Many cats seem to develop a preference for soft surfaces, such a as piles of clothes or the bed, while others may prefer slick surfaces, such as the bathtub or the kitchen sink. Cats with an outdoor history may prefer dirt or grass. To resolve a surface preference problem, the litter box needs to made more like the textures your cat prefers for elimination, and the places your cat is soiling need to be made less attractive.