This passage is properly regarded as the Epilogue of the whole book; a kind of apology for the obscurity of many of its sayings. The passage serves therefore to make the book more intelligible and more acceptable.
Here, as in the beginning of the book Ecc 1:1-2, the Preacher speaks of himself Ecc 12:8-10 in the third person. He first repeats Ecc 12:8 the mournful, perplexing theme with which his musings began Ecc 1:2; and then states the encouraging practical conclusion Ecc 12:13-14 to which they have led him. It has been pointed out that the Epilogue assumes the identity of the Preacher with the writer of the Book of Proverbs.
Ecc 12:11
literally, Words of wise men are as goads, and as nails driven in (by) masters of assemblies; they are given from one shepherd: “goads,” because they rouse the hearer and impel him to right actions; “nails” (perhaps tent-spikes), because they remain fixed in the memory: “masters of assemblies” are simply “teachers” or “preachers” (see Ecc 1:1 note), instructors of such assemblies as Wisdom addresses Pro 1:20.
One shepherd - i. e., God, who is the supreme Giver of wisdom Pro 2:6, and the chief Shepherd Jer 23:1-4. Compare 1Co 2:12-13.
Ecc 12:12
By these - i. e., “By the words of wise men.”
Books - Rather, “Writings.” Probably the proverbs current in the Preacher’s age, including, though not especially indicating, his own.
The Preacher protests against the folly of protracted, unprofitable, meditation.
Ecc 12:13
literally, “The conclusion of the discourse” (or “word,” = words, Ecc 1:1), “the whole, let us hear.”
The whole duty of man - Rather, the whole man. To revere God and to obey Him is the whole man, constitutes man’s whole being; that only is conceded to Man; all other things, as this book teaches again and again, are dependent on a Higher Incomprehensible Being.
Ecc 12:14
Judgment with - Rather, judgment (which shall be held) upon etc.: i. e., an appointed judgment which shall take place in another world, as distinct from that retribution which frequently follows man’s actions in the course of this world, and which is too imperfect (compare Ecc 2:15; Ecc 4:1; Ecc 7:15; Ecc 9:2, ...) to be described by these expressions. He that is fully convinced that there is no solid happiness to be found in this world, and that there is a world to come wherein God will adjudge people to happiness or misery respectively, as they have made their choice and acted here, must necessarily subscribe to the truth of Solomon’s conclusion, that true religion is the only way to true happiness.