John Gill's Exposition of the Whole Bible
Ecclesiastes 12:7
Then shall the dust return to the earth as it was,.... The body, which is made of dust, and is no other in its present state than dust refined and enlivened; and when the above things take place, mentioned in Ecclesiastes 12:6, or at death, it returns to its original earth; it becomes immediately a clod of earth, a lifeless lump of clay, and is then buried in the earth, where it rots, corrupts, and turns into it; which shows the frailty of man, and may serve to humble his pride, as well as proves that death is not an annihilation even of the body; see Genesis 3:19;
and the spirit shall return unto God who gave it; from whom it is, by whom it is created, who puts it into the bodies of men, as a deposit urn they are entrusted with, and are accountable for, and should be concerned for the safety and salvation of it; this was originally breathed into man at his first creation, and is now formed within him by the Lord; hence he is called the God of the spirits of all flesh; see Genesis 2:4. Now at death the soul, or spirit of man, returns to God; which if understood of the souls of men in general, it means that at death they return to God the Judge of all, who passes sentence on them, and orders those that are good to the mansions of bliss and happiness, and those that are evil to hell and destruction. So the Targum adds,
"that it may stand in judgment before the Lord;''
or if only of the souls of good men, the sense is, that they then return to God, not only as their Creator, but as their covenant God and Father, to enjoy his presence evermore; and to Christ their Redeemer, to be for ever with him, than which nothing is better and more desirable; this shows that the soul is immortal, and dies not with the body, nor sleeps in the grave with it, but is immediately with God. Agreeably to all this Aristotle w says, the mind, or soul, alone enters θυραθεν, from without, (from heaven, from God there,) and only is divine; and to the same purpose are the words of Phocylides x,
"the body we have of the earth, and we all being resolved into it become dust, but the air or heaven receives the spirit.''
And still more agreeably to the sentiment of the wise man here, another Heathen y writer observes, that the ancients were of opinion that souls are given of God, and are again returned unto him after death.
w De Generat. Animal. l. 2. c. 3. x σωμα γαρ εκ γαιης, c. Poem. Admon. v. 102, 103. So Lucretius l. 2. "cedit item retro de terra", c. y Macrob. Saturnal. l. I. c. 10.