means that
property or wealth obtained dishonestly is unlikely to bring lasting benefit and may lead to further trouble.
also
What is got over the Devil's back is spent under his belly
When it is easily lost somethng that was obtained dishonestly or illegally., the saying “Ill gotten goods never thrive” is appropriate.