The Apostle above forbade carnal sins (5:3), here he threatens them with the penalty of damnation that is inflicted on sinners.
He states For know you this and understand, that is, be actually certain of it and not just habitually. "These things I write to you that you may know that you have eternal life; you who believe in the name of the Son of God" (1 Jn. 5:13). And what does he write? That no fornicator or unclean or covetous person, which is a serving of idols, hath inheritance in the kingdom of Christ and of God.
Notice that he calls covetousness idolatry, for idolatry happens when the... honor due God alone is given to creatures. Now there is a twofold honor due God; we must establish him as the goal of our life and we must put our trust of reaching the goal in him. Hence, whoever places these in creatures is guilty of idolatry. A covetous person commits this when he fixes his end in a created reality as well as putting all his trust in it. "Of their silver and their gold they have made idols to themselves, that they might perish" (Os. 8:4). This happens since, as Proverbs 11 (28) affirms: "He that trusteth in his riches shall fall."
However, since in the other sins a man also puts his goal in a creature, changing to it by love, why are not they termed idolatry too? I reply that idolatry consists in giving an illegitimate worship to some external object. Whereas in the other sins one's end is deorientated interiorly, as though it consisted in one's own exaltation. Whoever places his end in riches, on the other hand, fixes it in an external object as an idol. Does that mean that covetous persons, giving the honor due God to creatures, are really and essentially idolators? I hold that they are not, because in moral issues acts or deeds are judged by their end. Therefore, only those are essentially idolators who intend to really offer worship to a creature. A covetous person does not really (per se) intend to do this, he only happens (per accidens) to do it in his excessive and inordinate love [for riches].
What happens to such people? They do not possess the inheritance since heirs are sons, as Romans 8 (17) states. But these persons are not sons because they are carnal, therefore they do not enjoy the inheritance as 1 Corinthians 15 (50) affirms: "Now this I say, brethren, that flesh and blood cannot possess the kingdom of God," that is, God himself who said: "I am their inheritance" (Ez. 44:28).
It might be asked: If the inheritance is God himself who is indivisible and inseparable, why does he say in the kingdom of Christ and of God, dividing the two as if the inheritance could be severed? I reply. Our inheritance consists in the enjoyment of God. But God enjoys himself in a way different from that in which we shall enjoy him. God perfectly delights in himself since he perfectly knows and totally loves himself inasmuch as he is knowable and lovable. Not so with us, even though we shall perfectly know him in heaven and, as a consequence, love him. For someone may indeed grasp a simple reality and know the whole of it, while still not [knowing it] totally. For example, if the light of the sun were as small as a point, the human eye could perceive the whole of it, although not fully, whereas the eagle's eye would grasp it totally. Similarly, even if we know God perfectly in heaven and love him perfectly, nevertheless we do not totally comprehend him. Hence it seems that there is a certain imperfection and individuality there. Therefore he says of Christ and of God conjointly, as though setting one part with another part, since it is through Christ and none other that the inheritance is had.
Source: Commentary on Ephesians