Maharaj was a political activist and member of the then banned South African Communist Party, who worked in a clandestine manner on anti-apartheid activities with Nelson Mandela. In July 1964, Maharaj was arrested in Johannesburg, charged and convicted with four others including Laloo Chiba and Wilton Mkwayi on charges of sabotage in the little Rivonia Trial, and was imprisoned on Robben Island with Mandela. In prison he secretly transcribed parts of Mandela's memoir "Long Walk to Freedom" and smuggled it out of the prison in 1976.