In February 2009, Ahmed Douma, then a student at Tanta University, was arrested at the border to the Gaza Strip, after he had entered it with a group of anti-war activists who wanted to express their solidarity with the Palestinian people. He was tried before a military court for illegally crossing the border and sentenced to one year in prison. During his transport to the prison and during interrogations there, he was tortured and threatened with the use of false confessions to obtain further convictions against him.
In January 2012, he was detained and charged with inciting violence against the army and encouraging attacks on public property, following the Cabinet clashes in December 2011. During these clashes, 12 people were killed and 815 were injured, when police and military forces cracked down on a sit-in outside the Cabinet office in Cairo, which was organized by activists protesting against the appointment of Kamal Ganzouri as prime minister by the Supreme Council of the Armed Forces.
In April 2013, Ahmed Douma was arrested after calling President Morsi a killer and a criminal, and on 3 June he was convicted to six months in prison for insulting the president. However, Douma appealed the verdict, and on 6 July another court ordered his release without bail.
On 3 December 2013, Ahmed Douma was arrested at his home, following a protest organized by the No Military Trials for Civilians campaign in defiance of a new restrictive protest law, which was violently dispersed by the police. On 22 December, he was sentenced, together with Ahmed Maher and Mohammed Adel, to three years in prison with hard labour and a fine of EGP 50,000 for his participation in protests illegal under the new protest law. In an attempt to reverse the verdict he joined a hunger strike with other deteinees who were imprisoned under the new protest law. However, he had to end it due to his deterorating health.
The verdict was condemned by several Egyptian Human Rights organisations as well as by the High Representative of the European Union for Foreign Affairs Catherine Ashton and the United Kingdom Foreign Office. On 23 December, the Road of the Revolution Front organized a demonstration in Cairo in solidarity with the three activists. Hamdeen Sabahi has censured the court conviction sentencing Ahmed Maher, Mohamed Adel, and Ahmed Douma to three years in prison and a fine of LE50,000 and maintains that Interim President Adly Mansour should issue these and other detained individuals a pardon. The Constitution Party has expressed solidarity with the detainees and their families and requested that the interim President Adly Mansour issue a pardon to Ahmed Maher, Mohammed Adel, and Ahmed Douma, as well as to Loay Abdel Rahman, Omar Hussein, Islam Ahmed, and Nasser Ibrahim.
On 4 February 2015, The Cairo Criminal Court sentenced Ahmed Douma to life imprisonment and fined him LE 17,000,000.