She became a member of the Brussels Parliament in 2009 as the local councillor for Ixelles, and then also sat in the Wallonia-Brussels Federation. She later became president of the Ecolo group at the Belgian Senate. Khattabi was elected, along with Patrick Dupriez, as co-leader of Ecolo during a party conference in Charleroi in 2015. Dupriez was replaced in 2018 by Jean-Marc Nollet.
In a 2018 interview with Le Soir, Khattabi called for a "new model" for Brussels without separate Flemish and Francophone communities. That same year following the killing of 14 women from macho violence in Belgium that year, Khattabi called for the recognition of femicide.
Under Khattabi's co-presidency, Ecolo made large gains in Brussels in the local elections of 2018 to become the second largest party there. In the 2019 federal election Ecolo doubled its share of the vote, and gained its biggest number of seats yet, which Khattabi attributed to a rising "green wave" in Europe.
In January 2020, Khattabi failed to gain sufficient support from Belgian senators to become one of the judges at the Belgian Constitutional Court. Her candidature received the votes of only 38 of 60 senators, whereas a supermajority of two-thirds was required. The vote should have been held in November 2019 originally, but was postponed after a campaign by right-wing party N-VA and far-right Vlaams Belang against Khattabi's candidature.