I always thought “righteousness” was something we couldn’t get enough of. I didn’t even know it was possible to be “overrighteous.”

I don’t think the writer is advocating a lack of morality. I think he’s denouncing legalism — the false belief that righteousness can be achieved through slavish devotion to a moral code. One whose identity is solely bound to the “righteousness” and “wisdom” of his own actions deceives himself. Such self-deception is tantamount to destruction (v16), which is the way in which a righteous man perishes in his righteousness.

Righteousness — or right standing before God — is from God, a gift revealed through faith (Romans 1:17). I believe faith involves an act of the human will — it is not something that “happens to us” but rather it is something that “happens in us.” But I also believe faith is actuated through obedience. Faith in God should always lead to greater obedience and, presumably, greater righteousness being manifest in our lives. And yet, the Preacher in Ecclesiastes stakes out a position that reminds us of the dangers of thinking too highly of our own righteous works. Elsewhere he writes:

There is not a righteous man on earth who does what is right and never sins. — Eccl. 7:20

With this safeguard in place, I don’t think we’ll be accused of being “overrighteous” anytime soon.