During the apartheid era, Nelson Mandela was imprisoned for a number of crimes. However, the real reason that he was imprisoned is because he was working to get rid of apartheid in South Africa.
The actual charges on which Mandela was imprisoned had to do mainly with his desire to overthrow the South African government. Mandela was accused of having recruited people to participate in the violent overthrow of the South African government. For activities such as these, he was actually listed as a terrorist by the US government. Mandela did not really try to defend himself against these charges and instead used his trial as an opportunity to air his political views. He was therefore convicted and sentenced to life in prison.