The concept that the love of the Lord leads to chastening has a long history in Judeo-Christian thought. In various iterations, it permeates the advice of Proverbs to parents in dealing with their children. As the earthly advice, so the heavenly. God is to us a father, and therefore also chastens we whom he loves:
Proverbs 23:13-14
13 Withhold not correction from the child: for if thou beatest him with the rod, he shall not die.
14 Thou shalt beat him with the rod, and shalt deliver his soul from hell.
Note that the rod is used for correction. Just as in the case of the wayward Nephites, the child is on the wrong path. The use of a chastening rod may return the child to his senses. In this case, the writer of Proverbs understands that the process may be painful, but it is nevertheless not fatal, “he shall not die.” It is significant that the context of this proverb is one of eternal salvation. The chastening will “deliver his soul from hell.” Of course this is precisely the danger in which the Nephites find themselves.
These same sentiments continue to find echo in other passages in Proverbs:
Proverbs 22:15
15 Foolishness is bound in the heart of a child; but the rod of correction shall drive it far from him.
Children will be foolish. The Nephites were foolish. The application of the “rod of correction” is a means by which the child, and the Nephites, might be restored to their proper way.
Proverbs 13:24
24 He that spareth his rod hateth his son: but he that loveth him chasteneth him betimes.
It is possible that the phraseology of living and chastening in the Book of Mormon is an echo of Proverbs 13:24. Certainly the sentiment is authentic and more widespread that this verse, but the similarity of the language suggests the influence of the text on the language in which we receive Samuel’s admonition.