1 Corinthians 6:9-11
9 Know ye not that the unrighteous shall not inherit the kingdom of God? Be not deceived: neither fornicators, nor idolaters, nor adulterers, nor effeminate, nor abusers of themselves with mankind,
10 Nor thieves, nor covetous, nor drunkards, nor revilers, nor extortioners, shall inherit the kingdom of God.
The verses explain themselves. You have to be righteous to get your inheritance from God. You can not straddle the fence, nor can you live a life of sin. You have to live and walk righteously before God. You have to let God clean up your life. You have to remove the sin out of it. To inherit the kingdom of heaven, you must live righteous.