Ecclesiastes 1:18

For in much wisdom is much grief: and he that increaseth knowledge increaseth sorrow.

In much wisdom is much grief, and he who increases knowledge increases sorrow. The grief comes when wisdom is joined with the effort to know madness and folly, as set forth in the preceding verse about knowing folly alongside wisdom. Solomon's own pursuit illustrates this, for his testing of both wisdom and madness gave painful insight rather than lasting good, and his increased knowledge of evil increased his anguish. Wisdom and knowledge gained in that way bring grief and sorrow rather than lasting good.

The sorrow comes from seeing wicked folly, not from walking in wisdom's pleasant and peaceful ways. The grief is sorrow connected with confronting folly, not pleasure in watching the wicked act foolishly. Wisdom by itself does not keep a person on the right path, for like honor or wealth it can be misused and lead someone away from God. Wisdom and increased knowledge bring grief and sorrow when human life and its pursuits are considered apart from God.