Once Joseph Smith was released from Liberty Jail and reunited with his family and the Latter-day Saints, the question arose as to whether it was safe for the Saints to gather in one place. The alternative was to spread out. The Church was still in its formative stages, and Joseph Smith was receiving constant revelations of doctrine and keys to church organization. He was also being taught line upon line from heaven regarding the sacred ordinances of the temple, including baptism for the dead and the doctrines behind it.
Joseph Smith and the Church were plagued by debt, persecution and law suits, but were still able to procure land on the east side of the Mississippi River in Commerce, Illinois. The shoreline was a malarial swamp and would need to be drained, but the Latter-day Saints began to gather there.
The Twelve Apostles, who had helped the Saints leave Missouri while the Mormon prophet was imprisoned, now left for missions abroad, while Joseph oversaw the establishment of a city in Commerce, which he renamed Nauvoo, meaning the beautiful. Meanwhile, the Saints compiled a record of their lost property and injuries, so they could seek redress. Martin van Buren was the U.S. president then, and said he could do nothing for them.
Joseph Smith established Nauvoo as a city with a legal charter, meaning that it could mount a militia for self-defense. The city established a law of habeas corpus, so no one could be arrested without being presented a list of charges against him. The city also established a university.
Nauvoo prospered, and immigrants soon began arriving from England and Canada. In 1840, the Mormon Church was ten years old and had grown from a mere 6 members in April 1830, to over 16,000 by the end of 1840. There were now enough Mormons in England that the Church began publishing its own newspaper in that country, The Millennial Star. 
Nauvoo was orderly and lovely, and visitors commented upon the industry of the citizens. Every civilized activity could be found there. The Saints drained the swamp, causing many to fall to disease, including Joseph Smith’s father, who was weakened by past persecutions. The prophet healed many of their infirmities by the power of the priesthood. The Saints began to build their second temple, wherein they could endow each member with power from on high and perform the newly revealed ordinances of the true church. In 1841, though the temple was still not completed, part of it was used for baptisms for the dead.
By 1841, the number of Mormons had grown so much that they spilled over into Hancock County and across the Mississippi into Iowa. In March 1842, Joseph Smith organized the Relief Society, the women’s auxiliary of the Church, under the auspices of the priesthood. The Relief Society organized service to the poor and the needy and provided sisterhood for the women of the Church. Today, it is the largest and oldest women’s organization in the world.
John C. Bennett moved to Nauvoo as a convert and quickly became a leader in the community, but he used his authority to seduce women and was excommunicated. He quickly became an enemy to the Church and caused persecution to increase. This caused Joseph Smith to alternate periods of presence in Nauvoo and periods in hiding. When in Nauvoo, Joseph delivered sermons to thousands of Saints at once, usually outside, because there were so many people.
Joseph Smith had inquired of the Lord regarding David and Solomon and the prophets of old, who had many wives. Was it a sin? The revelatory answer from God was preceded by a warning— anyone to whom the law of eternal marriage was given, would have to live it. The law is that men may have multiple wives, only when the Lord ordains it through His prophet, at a time which the Lord must choose. Otherwise, a man should have only one wife. The kings of old sinned not, except with those wives who were not given them by the Lord. David had not sinned until he committed adultery with Bathsheba. The Lord told Joseph Smith that He desired now to “raise up seed unto Himself,” and that the Latter-day Saint leaders should begin to enter in to plural marriage.
The commandment was challenging in the extreme. Although 80 percent of the world’s population engaged in polygamy at the time, Americans were descendants of western Europeans, and it was the Victorian age, where the roles of husband and wife were strictly defined, as was morality. Joseph knew that to enter into such a practice would heap more persecution on the Saints, and that some would leave the Church as soon as they got the commandment. He worried that his own wife would not consent, and it took the consent of the first wife. It was nearly ten years before Joseph was able to fully reveal the law to the Saints, and some people did leave the Church, and persecution did increase. Joseph, while knowing the law and being unable to reveal it fully to the membership, entered into plural marriage discretely, and his wife Emma struggled mightily with it. It appears that at least some of Joseph’s polygamous unions were “spiritual,” meant only to be in effect in heaven, while some of his wives were were married to others for this mortal life. There are no recorded offspring from any of these marriages. (For more on polygamy, go to Mormon-Polygamy.org.)
Brigham Young was devastated by the revelation on plural marriage. He said that for the first time, whenever he saw a funeral procession, he envied the dead. Never at any time did all of the Latter-day Saints enter into plural marriage, and rarely did men take more than two wives. Women had the power of consent and divorce, and some found the institution liberating— one wife could go to school or pursue a profession while the other watched the children. Other unions were more difficult.
By 1944, Joseph Smith was a champion of minority groups in the United States, even running for President to bring to light the cause of the down-trodden. He established a fund to buy slaves from slave owners, and then free them. The slave owners could use the money to transform their estates so that they would no longer need slaves.
On June 7, 1844, William Law, a disaffected Mormon, published the first and only edition of the Nauvoo Expositor. It was a scandalous paper that called for Joseph Smith to be hung. The printing office was declared a public nuisance and the city officers (Joseph Smith was mayor at the time) destroyed the press, causing a riot. The county sheriff meant to arrest Joseph Smith, who went into hiding for a few days. If Joseph Smith were arrested, he would be tried in Carthage, Illinois, where he knew he could not receive a fair trial. He turned himself in, hoping to be tried in Springfield, and after having been promised safety and fairness. He was imprisoned in Carthage with a few faithful friends— John Taylor, Willard Richards, and his brother, Hyrum Smith. A mob attacked while they were incarcerated, killing Joseph and Hyrum and wounding John Taylor. Joseph and Hyrum’s brother Samuel, also died, from exposure on his many trips back and forth to the jail. The martyrdom occurred on June 27, 1844. John Taylor, who would be the third prophet of the Church, wrote about the martyrdom in the Doctrine and Covenants, section 135.
Joseph Smith had ever accepted any commandment the Lord gave him, no matter what the difficulty or sacrifice. He restored the priesthood authority of Jesus Christ, and the gospel as it was in ancient times. He translated the Book of Mormon, the Pearl of Great Price, and compiled the revelations in the Doctrine and Covenants. He completed a partial translation of the Bible, and organized a church, beginning with 6 people, that now fills the earth. With 14 million members worldwide, the prophecy has been fulfilled that Joseph Smith would be known for good or ill by all nations, tongues, and kindreds of the earth. He established and restored the Lord’s Church in preparation for the Second Coming of Christ. It is “a marvelous work and a wonder.”