Ibrahim was born in Sudan in 1957. Ibrahim was from the Koba branch of the Zaghawa ethnic group, which is () located mainly in Sudan, with a minority on the Chad side of the border. He was an enthusiastic supporter of the National Islamic Front (NIF) seizure of power under the direction of Islamist Hassan al-Turabi in 1989. He also served as the state minister for education in Darfur between 1991 and 1994 in al-Fashir, North Darfur. A physician, Dr. Khalil spent four months in 1992 to fight Sudan People's Armed Forces. By Ibrahim's own account, he was disaffected with the Islamist movement by 2000 after seeing the economic neglect of the NIF, as well as its support to armed militias. At this time, he became part of a covert cell of Islamists who were seeking to change the NiF from inside. Dr. Ibrahim went on to serve as the state minister for social affairs in Blue Nile in 1997 before a post as advisor to the governor of Southern Sudan in Juba in 1998. However, others noted that he never received a national level appointment. Ibrahim's colleague in JEM, Ahmad Tugod, stated, "Khalil is not a first or even second class political leader. [...] He struggled all of his life to get a post in Khartoum." He quit the post in August 1998, several months before the end of his appointment, and formed an NGO called "Fighting Poverty". In December 1999, when al-Bashir sidelined al-Turabi with the help of Ali Osman Taha, Dr. Ibrahim was in the Netherlands, studying for a Masters in Public Health at Universiteit Maastricht. In the meantime, the structure of covert cells that Ibrahim had helped set up in 1994 had spread to Khartoum. The dissidents, dubbing themselves the "The Seekers of Truth and Justice" published the Black Book in 2000, claiming that riverine Arabs dominated political power and resources. Khalil Ibrahim sided with the breakaway Popular Congress party, who had split from President al-Bashir's party. In 2001, he was one of twenty people sent out of the country by the dissidents to go public. In August 2001, Ibrahim published a press release from the Netherlands, in which he announced the formation of the Justice and Equality Movement. The JEM has a relatively small ethnic base of support, being limited to the Kobe Zaghawa, including many kinsmen from across the Chadian border. Ibrahim received political and financial support from Libya and its leader Muammar Gaddafi. After the NTC's win in the 2011 Libyan civil war against the government of the Jamahiriya he was forced to flee back to Darfur.