5 Now this was the tradition of Lamoni, which he had received from his father, that there was a Great Spirit. Notwithstanding they believed in a Great Spirit, they supposed that whatsoever they did was right; nevertheless, Lamoni began to fear exceedingly, with fear lest he had done wrong in slaying his servants;
Their tradition taught that there was a God, but that he didn't matter very much in their daily lives. He created all things, but had no role in their lives on a day to day basis. Most people live their lives that way now. If you ask someone on the street if they believe in God, most would say yes, but it is clear that generally speaking, God's laws and commandments do not inform their daily walk in life.
In spite of this tradition that Lamoni received from his father, he began to fear that he had done wrong in ordering the execution of his servants for their failures. His heart was prepared by the Holy Spirit to receive the truth. He was so eager to hear what Ammon knew that he offered to give Ammon anything he wanted if Ammon would teach him what Ammon knew. When Ammon taught the plan of redemption, King Lamoni "believed all his words."
I love Lamoni's prayer: "O Lord, have mercy; according to thy abundant mercy which thou hast had upon the people of Nephi, have upon me, and my people." His fear was that he had committed sin and what he wanted most was mercy which is available to all who believe and repent.