Having the Lamanites surrounded, Moroni negotiated with Zerahemnah over the terms of surrender. The conditions were simple: lay down your weapons of war and covenant to never come back to fight the Nephites again. Any who would do those two things were allowed to return in peace to their own lands. In spelling out these terms, Moroni used this phrase: "by the maintenance of the sacred word of God, to which we owe all our happiness." (v. 5)
The word of God is a guide to peace and happiness in this life and eternal life in the world to come. Nephi wrote of his father's vision of the tree of life (1 Nephi 11):
25 And it came to pass that I beheld that the rod of iron, which my father had seen, was the word of God, which led to the fountain of living waters, or to the tree of life; which waters are a representation of the love of God; and I also beheld that the tree of life was a representation of the love of God.
One of my favorite scriptures is from Psalms 119. It expresses my love for the scriptures, the study and application of which I know brings us to know the Author and leads to life eternal.
103 How sweet are thy words unto my taste! yea, sweeter than honey to my mouth!
104 Through thy precepts I get understanding: therefore I hate every false way.
105 Thy word is a lamp unto my feet, and a light unto my path.