Mujica's history has a lot of shades.
During the 60's, there was an uprising in violence in Uruguay. As a response, the right-wing governing party became more totalitarian and allied with the military.
Each side accuses the other of starting the violence, but the thing is a left wing guerrilla movement was started - the "Tupamaros", with Mujica as a founding member, based on the Cuban revolution ideals, and started taking military action, bombings, etc (some predate the founding of the "Tupamaros"), in which Mujica took part. The government responded with more violence, ending in the military coup of 1973 and subsequent dictatorship.
Mujica was imprisioned twice, he once staged a cinematic escape from prision, but he spent a decade in prision overall.
After the reestablishment of democracy, he joined the left wing party Frente Amplio (Broad Front), which ended up winning in 2005. He's now more subdued, but he doesn't deny his guerrilla past.