Joseph, in his 1832 History, discusses the background to the loss of the Book of Lehi.
History, circa Summer 1832, 5-6, The Joseph Smith Papers website, accessed December 5, 2023
I commenced translating the characters and thus the Propicy [prophecy] of Isiaah was fulfilled which is writen in the 29 chaptr concerning the book and it came to pass that after we had translated 116 pages that he desired to carry them to read to his friends that peradventur he might convince them of the truth therefore I inquired of the Lord and the Lord said unto me that he must not take them and I spake unto him (Martin) the word of the Lord and he said inquire again and I inquired again and also the third time and the Lord said unto me let him go with them only he shall covenant with me that he will not shew them to only but four persons and he covenented withe Lord that he would do according to the word of the Lord therefore he took them and took his journey unto his friends to Palmire [Palmyra] Wayne County & State of N York and he brake the covenent which he made before the Lord and the Lord suffered the writings to fall into the hands of wicked men and Martin was Chastened for his transgression and I also was chastened also for my transgression for asking the Lord the third time wherefore the Plates was taken from me by the power of God and I was not able to obtain them for a season