Obedience is the first law of heaven, the cornerstone upon which all righteousness and progression rest. It consists in compliance with divine law, in conformity to the mind and will of Deity, in complete subjection to God and his commands. To obey gospel law is to yield obedience to the Lord, to execute the commands of and be ruled by him whose we are.
Obedience is possible because of two things: 1. Laws were ordained by Deity so that his spirit children by conformity to them might progress and become like him; and 2. The children of God were endowed with agency, the power and ability to either obey or disobey the divine will. Obedience and disobedience thus had their beginnings in pre-existence, the obedient spirits being the ones who kept their first estate and the disobedient the ones who were cast out with Lucifer and his hosts. The perfect formula for obedience was stated by our Lord in the pre-existent council when he volunteered to follow the Father's plan and be the Redeemer of the world: "Father, thy will be done, and the glory be thine forever." (Moses 4:2.)
The very purpose of the creation of this earth was to provide a place where the spirit children of the Father, having received their mortal bodies, could be tried and tested. "We will prove them herewith," the divine decree reads, "to see if they will do all things whatsoever the Lord their God shall command them." (Abra. 3:25.) The Lord created men, placed them on earth, "And gave unto them commandments that they should love and serve him, the only living and true God, and that he should be the only being whom they should worship." (D. & C. 20:19.) The whole system of creation and existence is thus centered around the eternal principle of obedience to law.
One of Adam's great religious acts has become the classical illustration of perfect obedience. This first man of all men was commanded by the Lord to offer the firstlings of his flocks as a sacrifice, which he did. Thereupon an angel appeared to him and asked: "Why dost thou offer sacrifices unto the Lord? And Adam said unto him: I know not, save the Lord commanded me." Then the angel told him the purpose and significance of sacrifice. (Moses 5:5-8.) It should be noted that obedience preceded receipt of the new revelation.
It is interesting to note, also, that it was in connection with the law of sacrifice that another of the great classical illustrations of obedience was given. Saul, having disobeyed counsel by not destroying the cattle of the Amalekites, choosing rather to offer them in sacrifice to the Lord, received this rebuke from the Prophet Samuel: "Hath the Lord as great delight in burnt offerings and sacrifices, as in obeying the voice of the Lord? Behold, to obey is better than sacrifice, and to hearken than the fat of rams. For rebellion is as the sin of witchcraft, and stubbornness is as iniquity and idolatry." (1 Sam. 15:22-23.)
All men are commanded to believe the gospel, repent of their sins, enter in at the gate of baptism, get on the strait and narrow path, and endure to the end in righteousness by obedience to all the laws and ordinances of the gospel. They thereby attain a hope of eternal life in the kingdom of God. (2 Ne. 31; 3 Ne. 27:13-22.) By baptism they make a solemn covenant to serve God "and keep his commandments" (Mosiah 18:7-10), which covenant they renew each time they partake of the sacrament. (D. & C. 20:77-79.)
Man's love of God is measured in terms of obedience and service. "If ye love me, keep my commandments," our Lord proclaimed. (John 14:15.) All blessings flow from obedience to law. (D. & C. 130:18-21.) And since man has been created and redeemed by the Lord, that holy being is certainly entitled to expect his own handiwork to abide by the counsels which he gives from time to time. (Mosiah 2:20-24.)
Christ, himself, set the perfect example of obedience for all his brethren. As the great Exemplar he was baptized to witness "unto the Father that he would be obedient unto him in keeping his commandments." (2 Ne. 31:7.) In all things his obedience was perfect. As Paul wrote: "Though he were a Son, yet learned he obedience by the things which he suffered; And being made perfect, he became the author of eternal salvation unto all them that obey him." (Heb. 5:8-9.) (Mormon Doctrine, p.539-540)