Jesus Christ was arrested and detained after he was betrayed. False witnesses bore testimony against our Savior and he was accused by the chief priests and elders who were the leaders of the popular church of his day (Matt. 27:12). The governor was ready to release him, but the people demanded that he be killed. He was stripped of his clothes, spit upon, smitten, and crucified on a cross among thieves.
So you see, even the God of Israel spent time in prison—and was convicted and executed for his "crimes." Joseph Smith was also unjustly detained by wicked men, having been imprisoned at Richmond Jail, Liberty Jail, and finally at Carthage Jail, where his life was taken by a mob in June, 1844.
During the nineteenth century swearing out false charges against an individual was a very common form of legal "harassment." From a modem point of view, many of the charges filed against Joseph Smith were so ludicrous and biased as to be almost comical. Often they completely lacked any legal substance. For instance, Joseph was charged with "disturbing the peace" for preaching from the Book of Mormon and for holding a baptismal service. In several instances the constables and other legal officers who served the required summons became staunch supporters of Joseph Smith when they ascertained the truth of the matters in question. In those instances where the matters came to trial, the charges were usually thrown out of court as being without substance, or a ruling was made in favor of Joseph Smith.
Other great men of God who are venerated by all Christians also have
been imprisoned. These include Joseph of old, Jeremiah, Daniel, John the
Baptist, Peter, Paul, and other apostles. Surely imprisonment for one's
belief is not as much of an indictment against the person in prison as
it is against those who imprison them in an attempt to thwart the work
of God.