Joseph Smith's life in Missouri
The life of Joseph Smith from 1838 to 1839, when he was 33–34 years old, covers a period beginning when Smith left Ohio in January 1838 until he left Missouri and moved to Nauvoo, Illinois in 1839.
Background.
Smith's early revelations identified western Missouri as Zion, the place for Mormons to gather in preparation for the second coming of Jesus Christ. Independence, Missouri, was identified as "the center place" and the spot for building a temple. Smith first visited Independence in the summer of 1831, and a site was dedicated for the construction of the temple. Soon afterward, Mormon converts—most of them from the New England area—began immigrating in large numbers to Independence and the surrounding area.
The Latter Day Saints had been migrating to Missouri ever since Smith had claimed the area to be Zion. They simultaneously occupied the Kirtland area, as well as the Independence area for around seven years. Following the failure of the Kirtland Safety Society, Smith fled for Missouri in January 1838, and the rest of the remaining Latter Day Saints followed.
Ecclesiastical matters.
During this time, a church council expelled many of the oldest and most prominent leaders of the church—including Oliver Cowdery, John Whitmer, David Whitmer, and W. W. Phelps—on allegations of misusing church property and finance amid tense relations between them and Smith. Smith explicitly approved of the excommunication of these men, who were known collectively as the "dissenters".
In Missouri, the church also took the name "Church of Jesus Christ of Latter Day Saints", and construction began on a new temple.
Conflict with Missourians.
Prelude to violence.
Political and religious differences between old Missourians and newly arriving Latter Day Saint settlers provoked tensions between the two groups, much as they had in Jackson County. 
Local leaders saw their Latter Day Saints as a religious and political threat, alleging that Smith and his followers would vote in blocs. Additionally, Mormons purchased vast amounts of land in which to establish settlements, and held abolitionist viewpoints, including Smith himself. Thus they clashed with the pro-slavery persuasions of the majority of Missourians. Tensions were fueled by the announcement by Smith that Jackson County, Missouri would be the New Jerusalem and that the surrounding lands were promised to the Church by God and that the Saints would inhabit that area.
By this time, Smith's experiences with mob violence led him to believe that his faith's survival required greater militancy against anti-Mormons. Around June 1838, Sampson Avard formed a covert organization called the Danites to intimidate Latter Day Saint dissenters and oppose anti-Mormon militia units. Though it is unclear how much Smith knew of the Danites' activities, he clearly approved of those of which he did know. After Rigdon delivered a sermon that implied dissenters had no place in the Latter Day Saint community, the Danites forcibly expelled them from the county.
In a speech given at Far West’s Fourth of July celebration, Rigdon declared that Mormons would no longer tolerate persecution by the Missourians and spoke of a "war of extermination" if Mormons were attacked. Smith implicitly endorsed this speech, and many non-Mormons understood it to be a thinly veiled threat. They unleashed a flood of anti-Mormon rhetoric in newspapers and in stump speeches given during the 1838 election campaign.
Violence.
On August 6, 1838, non-Mormons in Gallatin, Missouri, tried to prevent Mormons from voting, and the election day scuffles initiated the 1838 Mormon War. Non-Mormon vigilantes raided and burned Mormon farms, while Danites and other Mormons pillaged non-Mormon towns. In the Battle of Crooked River, a group of Mormons attacked the Missouri state militia, mistakenly believing them to be anti-Mormon vigilantes. 
This battle led to reports of a "Mormon insurrection" and the death of apostle David W. Patten. In consequence of the reports of the battle, the burning out of ex-Mormon 'apostates' by the Danites, the attack on non-Mormons in Caldwell County, the sacking of Gallatin by the Mormons, and their reported plans to burn Richmond and Liberty, Missouri Governor Lilburn Boggs issued Missouri Executive Order 44, also known as the "Extermination Order" on October 27, 1838. The order stated that the Mormon community was in "open and avowed defiance of the laws, and of having made war upon the people of this State ... the Mormons must be treated as enemies, and must be exterminated or driven from the State if necessary for the public peace—their outrages are beyond all description." The Extermination Order was not officially rescinded until June 25, 1976 by Governor Christopher S. Bond.
Soon after the "Extermination Order" was issued, vigilantes attacked an outlying Mormon settlement and killed seventeen people. This event is identified as the Haun's Mill Massacre. Soon afterward, the 2,500 troops from the state militia converged on the Mormon headquarters at Far West. Smith and several other Church leaders surrendered to state authorities on charges of treason. Although they were civilians, Smith was immediately brought before a military court, accused of treason, and sentenced to be executed the next morning, but Alexander Doniphan, who was Smith's former attorney and a brigadier general in the Missouri militia, refused to carry out the order.
Aftermath.
The legality of Boggs' "Extermination Order" was debated in the legislature, but its objectives were achieved. Most of the Mormon community in Missouri had either left or been forced out by the spring of 1839. Many found refuge in settlements in Illinois. Brigham Young–as president of the church's Quorum of the Twelve Apostles, one of the church's governing bodies–rose to prominence when he organized the move of about 14,000 Mormon refugees to Illinois and eastern Iowa.
An estimated 800 Mormons were forcibly dispossessed of their homes and businesses. A long trail of appeals went as far as Washington, D.C., with Joseph receiving a personal audience with President Martin Van Buren, who said he could not help. Congress sent the matter back to the state of Missouri.
Liberty Jail.
Imprisonment.
After losing the Mormon War (1838), Smith and other church leaders were then transferred to the jail at Liberty, Missouri, the Clay County seat, to await trial. Although he frequently called down imprecatory judgments on his enemies and perceived enemies, as Fawn Brodie has written, Smith bore his harsh imprisonment "stoically, almost cheerfully, for there was a serenity in his nature that enabled him to accept trouble along with glory." Smith wrote to his followers "with skill and tact" attempting to dispel the now current notion that he was a fallen prophet. Brigham Young later claimed that even Smith's brother William said he hoped that Joseph would never get out of the hands of his enemies alive. Smith and his companions also made two unsuccessful attempts to escape from jail before, on April 6, they were started under guard to stand trial in Daviess County.
Escape.
Once the Latter Day Saints no longer posed a political threat, Missouri leaders realized that Mormon behavior could hardly be classified as treason whereas, as Fawn Brodie has written, the governor's "exterminating order stank to heaven." On the way to trial, the sheriff and guards agreed to get drunk on whiskey purchased by Joseph's brother Hyrum and looked the other way while their prisoners escaped.
References.
 ;templatestyles src="Refbegin/styles.css" / ;