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.
Nelson Mandela spent 27 years as a political prisoner in South Africa before becoming the country's first black president. Mandela was a leading member of the African National Congress (ANC), which opposed South Africa's white minority government and its policy of racial separation, known as apartheid. The government outlawed the ANC in 1960. Mandela was captured and jailed in 1962, and in 1964 he was convicted of treason and sentenced to life in prison. He began serving the sentence as prisoner 46664 on Robben Island, near Cape Town, but instead of disappearing from view, Mandela became a prison-bound martyr and worldwide symbol of resistance to racism. South African President F.W. de Klerk finally lifted the ban on the ANC and released Mandela in 1990. Mandela used his stature to help dismantle apartheid and form a new multi-racial democracy, and he and de Klerk shared the Nobel Peace Prize in 1993. Mandela was elected the country's president in 1994. He served until 1999, when he was succeeded by his deputy Thabo Mbeki. Mandela's autobiography, Long Walk to Freedom, was published in 1994.