The Spirit worked in the king’s heart, causing a fervent desire to be “born of God, having this wicked spirit rooted out of my breast,” to have the Spirit and be filled with joy. In other words, he wanted to know more—how to attain eternal life (the same inquiry made by the rich young ruler; see Luke 18). The king had found a pearl of great price, and he was willing to sacrifice all to get it (compare Matthew 13:45–46). Reread the statement from Joseph Smith (see commentary at Omni 1:26) about the necessity of our being willing to sacrifice all things, just as the king was willing to “give up all that I possess” in order to obtain the riches of eternity.
This is one of the great ironies of God’s kingdom: We must give up all in order to gain all. The question “What shall I do?” is one found over and over in the scriptures (for example, Acts 2:37; Luke 3:10) and is even posed by the Lord himself (Ether 2:23). It is a profound question.