He knnew that he was going to die and his brother volunteered to go with him knowing very well what outcome could come. He died for his faith. And he was persecuted for his faith throughout the book of mormon years. That makes him a martyr. And yes, JS went to prison in meekness and in a humble spirit.
4 When Joseph went to Carthage to deliver himself up to the pretended requirements of the law, two or three days previous to his assassination, he said: “I am going like a alamb to the slaughter; but I am calm as a summer’s morning; I have a bconscience cvoid of offense towards God, and towards all men. I SHALL DIE INNOCENT, AND IT SHALL YET BE SAID OF ME—HE WAS MURDERED IN COLD BLOOD.”—The same morning, after Hyrum had made ready to go—shall it be said to the slaughter? yes, for so it was—he read the following paragraph, near the close of the twelfth chapter of Ether, in the Book of Mormon, and turned down the leaf upon it:
5 And it came to pass that I prayed unto the Lord that he would give unto the Gentiles grace, that they might have charity. And it came to pass that the Lord said unto me: If they have not charity it mattereth not unto thee, thou hast been afaithful; wherefore thy garments shall be made bclean. And because thou hast seen thy weakness, thou shalt be made strong, even unto the sitting down in the place which I have prepared in the mansions of my Father. And now I . . . bid farewell unto the Gentiles; yea, and also unto my brethren whom I love, until we shall meet before the cjudgment-seat of Christ, where all men shall know that my garments are not spotted with your blood. The dtestators are now dead, and their etestament is in force.
scriptures.lds.org/en/dc/135