I'm grateful for your concern for your cousin -- and you are right: When we turn our backs on God (as he has done), we always end up paying a terrible price. The Bible warns, "You may be sure that your sin will find you out" (Numbers 32:23).
Why do some people who are outwardly Christians wander from the faith or even deliberately turn their backs on Christ? Sometimes, the Bible says, it is because they had never really committed their lives to Christ in the first place. They are "casual Christians" -- perhaps attending church and going through the motions, but not really following Christ as the Lord of their lives. Jesus said that people like this "honor me with their lips, but their hearts are far from me" (Matthew 15:8).
Sometimes, however, a person may have sincerely given his or her life to Christ -- but then falls into temptation and turns away from Christ for a time. Peter sincerely believed in Jesus -- but when Jesus was arrested Peter gave in to his fears and denied his Lord (see Matthew 26:69-75). But Peter repented of his sin, and later countless people came to Christ because of his witness.
Pray for your cousin, and also ask God to give you an opportunity to confront him -- lovingly and yet directly -- about the dangers he is facing. Then point him to Christ, who still loves him and wants to forgive him and welcome him home.