Under such circumstances, it would have been pretty clear to everyone that God had cursed such a person, and Sherem realized this. He also knew that if he went to his death without confessing what he had done wrong, things would go really badly for him. He had been nourished, or kept alive, by the ministering of the people for many days (7:14). And as he admitted, he believed that God was there and he believed in judgment, so he confessed.
Under Jewish law, if a person was going to be executed, the priests were told to instruct the person on how to give a proper confession, so that things would go as well as possible in the next life. Once they had obtained the confession of the guilty, they could then stone them. Sherem probably knew this. He confessed. In verse 18 he plainly said that he had been deceived.
In Jacob 6:8–10, Jacob had spoken interesting words in describing those who reject the prophets and reject the words concerning Christ. It refers to standing before God with shame and awful guilt. Sherem expressed that shame and guilt as a part of his confession. He knew that his condition and state would be awful and used several of these same words that Jacob had used.
As part of Sherem’s confession, shortly before his death, he requested that a public assembly be convened so that he could speak to the people. The assembly met so that Sherem could publicly confess his error and retract his previous teachings. A rib, or juridical dispute, was completed through some kind of confession, so it was perfectly suitable to the nature of this proceeding that it would have to come to some resolution by a confession, and it is interesting that it was not a forced confession. Later, Nehor will be "caused" to confess in Alma chapter 1, while Korihor will not confess entirely voluntarily, and his confession was deemed incomplete and inadequate by Alma. But Sherem seems to have given a fully acceptable, voluntary confession.
He denied the things which he had taught them. He "confessed the Christ, and the power of the Holy Ghost, and the ministering of angels. And he spake plainly unto them, that he had been deceived by the power of the devil. And he spake of hell, and of eternity, and of eternal punishment" (Jacob 5:17–18). Bear in mind Jacob’s discussion of the fate of those who would be punished eternally, back in Chapter 6. Then he says—and notice that this is a chiastic confession, of which the center is, "I fear lest I have committed the unpardonable sin."
This is the only quotation we have from Sherem. Jacob had simply summarized previously, but here are Sherem’s actual words. Bear in mind that Jacob introduced Sherem to his readers as someone who was skillful with the use of words. Interestingly and true to form, he made as complete a confession as possible. Why? Maybe he was hoping that somehow the curse would be lifted; that he will be healed. That did not happen in Sherem’s case, but he may have been trying to do everything he possibly could to reconcile himself not just with Jacob and Jacob’s people, but primarily with God.
Book of Mormon Central, "What Do We Learn About Ministering from the Account of Sherem? (Jacob 7:15)," KnoWhy 534 (October 3, 2019).
Book of Mormon Central, "Why Did Sherem Die? (Jacob 7:7)," KnoWhy 73 (April 7, 2016).