Now all has been heard; here is the conclusion of the matter: Fear God and keep his commandments, for this is the duty of all mankind. For God will bring every deed into judgment, including every hidden thing, whether it is good or evil. Ecclesiastes 12:13-14
Solomon reaches his conclusion for the meaning of life. To fear God is to recognize and respect that He is God and we are his creation. Solomon’s call for all men to obey God, keeping His commandments pleases God and fulfills man’s destiny. Man was created to have fellowship with his creator. Doing so, having a right relationship with God is our purpose in life, is what gives life meaning. Being in a right relationship with God truly makes all the things Solomon reviewed, analyzed, and contemplated meaningless, a chasing after the wind. God is in control, all the rest of these things are secondary to Him.
Solomon’s life concludes with his passing away. Scripture says Solomon reigned in Jerusalem over all Israel forty years. Then he rested with his fathers and was buried in the city of David his father. And Rehoboam his son succeeded him as king. In the end, Solomon’s life was as it is for everyone. The things that mattered were in the earlier times of his kingship when he followed the Lord wholeheartedly. That gave meaning and purpose to his life.