Job 27:8

For what is the hope of the hypocrite, though he hath gained, when God taketh away his soul?

The verse belongs to the debate between Job and his three friends about Job's afflictions. The word soul means life, so the taking away is the taking of life. The gaining is gaining wealth or success, even great wealth or success.

The question is what hope the hypocrite has when God takes away his life, and the answer is that earthly gain gives no lasting hope or security in the face of death and divine judgment. The hypocrite may keep his false hope even while appearing to have gained, but it gives him no security when God takes his life, and that self-deception can continue until death. Confidence in such a false hope cannot endure when God takes life, and it may fail as eternity approaches.

The warning continues in the next verses as applied to prayer: God will not hear the hypocrite's cry when trouble comes. The reason is that the hypocrite does not continually delight in God or call upon him.