"12 Remember also your Creator in the days of your youth, before the evil days come and the years draw near of which you will say, “I have no pleasure in them”; 2 before the sun and the light and the moon and the stars are darkened and the clouds return after the rain, 3 in the day when the keepers of the house tremble, and the strong men are bent, and the grinders cease because they are few, and those who look through the windows are dimmed,4 and the doors on the street are shut—when the sound of the grinding is low, and one rises up at the sound of a bird, and all the daughters of song are brought low— 5 they are afraid also of what is high, and terrors are in the way; the almond tree blossoms, the grasshopper drags itself along, and desire fails, because man is going to his eternal home, and the mourners go about the streets— 6 before the silver cord is snapped, or the golden bowl is broken, or the pitcher is shattered at the fountain, or the wheel broken at the cistern, 7 and the dust returns to the earth as it was, and the spirit returns to God who gave it. 8 Vanity of vanities, says the Preacher; all is vanity.
9 Besides being wise, the Preacher also taught the people knowledge, weighing and studying and arranging many proverbs with great care. 10 The Preacher sought to find words of delight, and uprightly he wrote words of truth.
11 The words of the wise are like goads, and like nails firmly fixed are the collected sayings; they are given by one Shepherd. 12 My son, beware of anything beyond these. Of making many books there is no end, and much study is a weariness of the flesh.
13 The end of the matter; all has been heard. Fear God and keep his commandments, for this is the whole duty of man. 14 For God will bring every deed into judgement, with every secret thing, whether good or evil."
Ecclesiastes 12:1-14
It is a misunderstanding to suppose that the statement 'Fear God, and keep His commandments' is an expression of a religion of law, even legalism, that falls short of the New Testament doctrine of grace. For one thing, such an attitude seems to suggest that 'grace' is a concept confined to the New Testament. But this is wide of the mark, for the Old Testament itself is full of grace, beginning indeed with grace, with ‘law' entering in as a later, contingent factor. The theologian, Emil Brunner, in the concluding chapter of his book, 'The Mediator', asserts that the whole gospel of Jesus Christ is the exposition of the First Commandment: 'I am the Lord thy God, thou shalt have none other gods but Me', and adds 'Whenever anyone really listens to the First Commandment and admits its reality, he already possesses the whole truth that the Scriptures and the gospel of Jesus Christ contain. The whole message of the Church, if it be a true message, simply aims at intensifying the force of this First Commandment. The Church has no other task. This includes all her teaching, both in dogma and in ethics. When this commandment is obeyed, then all is well with her both in her faith and in her active life. But all is not well with the Church when she thinks this is not sufficient; when she says that this commandment is only law, and what matters most is that the Gospel shall be preached. There is no other Gospel than this law itself.' Later in the chapter, Brunner adds: 'It is a terrible misunderstanding, the worst, the most subtle fraud ever perpetrated in the Name of God, if we think that everything does not depend upon this obedience, if we hold that through faith in the Mediator in justification, this obedience has become either superfluous or a secondary matter. Faith is obedience - nothing else - literally nothing else at all.'
This is how we must understand the closing words in Ecclesiastes; and when they are thus understood, they point its message right on to the New Testament gospel. The announcement of a tribunal in 14, the commentator Ellicott remarks, 'at which "every work", "every secret thing", shall be brought into judgment, cannot be reasonably understood of anything but a judgment after this life; so that this book, after all its sceptical debatings, ends by enunciating, more distinctly than is done elsewhere in the Old Testament, the New Testament doctrine of a day when God shall judge the secrets of men (Romans 2:16), shall bring to light the hidden things of darkness, and make manifest the counsels of the heart (1 Corinthians 4:5)'.