There is plenty of evidence as to how and why Smith was killed. He was a con man and was run out of state after state. In this case he was arrested for such and imprisoned. A pistol was sneaked to him. A lynch mob formed and in the ensuing chaos his brother was shot, Joseph shot at least one person and on the way out the window was shot in the back. For being Mormon? No. For conning farmers out of cash by pretending to find gold on their properties.
I am a good person, I am sure you are as well, but we are going to disagree on this point. I have read the churches explanation, that of people who were there, and the newspapers of the time. I am sorry that you were taught a lie, but this is what actually happened.