Moroni appeared to Joseph Smith Junior following Joseph's meditation about his standing before God regarding his righteousness. Joseph Smith had seen God the Father and Jesus Christ in answer to his prayer as a 14-year-old teenage boy about what church to join. Having been instructed to join none of them and to wait on the Lord, Moroni appeared as a resurrected being to 17-year-old Joseph to instruct him about the former inhabitants of the Americas. Following is a brief treatment of the life of Moroni, the son of Mormon.
Below are links to differing articles that reveal the humanity of the great man and prophet Moroni as interpreted through the lens of Rodric Johnson. Rodric is a faithful LDS Christian with an abiding love for the testimony of Jesus Christ as it is revealed through the Book of Mormon, the book that converted him to Christianity.
Witness of A Dying Nation, Moroni - We learn from Moroni's writings the precarious nature of his existence as he records "..after the great and tremendous battle at Cumorah, behold, the Nephites who had escaped into the country southward were hunted by the Lamanites, until they were all destroyed. And my father also was killed by them, and I even remain alone to write the sad tale of the destruction of my people. But behold, they are gone, and I fulfill the commandment of my father. And whether they will slay me, I know not."
Angel Moroni with the Everlasting Gospel to Preach - After depositing the Gold Plates and his visit to the boy Joseph Smith Jr., Moroni received a glorious and Christ-provided resurrection so that he could fulfill his mission regarding the plates as its last guardian in mortality.