A thought in thy wicked heart; literally, a thing in thy heart worthlessness, i.e. a thing which is worthless and unworthy. The word used is belial ( בְּלִיַּעַל), which does not denote that which is wicked so much as that which is worthless.
Thus, "a man of Belial" is a worthless fellow—not necessarily a wicked man (of. Deuteronomy 13:13). And it be sin unto thee; i.e. entail guilt upon thee, and so expose thee to the Divine displeasure.