Read about Moroni's instructions to Joseph

“He saw a bright light enter the room where he lay; he looked up and saw an angel of the Lord.” 

Lucy Mack Smith

The angel said that his name was Moroni and that he had once lived on earth as the last prophet of an ancient American people. It was, in part, through their forgotten records, he said, that Joseph would find the “fulness of the everlasting Gospel” the Lord had promised him.

The task would be difficult, Moroni warned. Joseph could only be entrusted with the plates the records were engraved on if his heart was focused solely on God’s work—but he would be tempted to use the plates for personal gain.