He was elected councillor of the City Council of La Roca del Vallès in 1987 and he was appointed Councillor for Culture under Mayor Romà Planas i Miró. In 1995, he joined the Socialists' Party of Catalonia and he became Mayor in replacement of the deceased Mayor. During his first term, La Roca Village was built, a shopping center that attracts nearly 4 million visitors each year. He was ousted as Mayor after a successful vote of no confidence in early 1999, but he soon made a comeback as his party commanded a qualified majority at the June 1999 local elections. In 2009, he moved to the private sector, being CEO of the audiovisual production company Cromosoma, a position he held for nine months. In September 2005, he was appointed Director-General for Infrastructure Management of the Department of Justice of the Regional Government of Catalonia. From 2010 to 2011 he was Director of the Economic Management Office of the City Council of Barcelona and Coordinator of the Local Socialist Group in the City Council from 2011 to 2016.
Iceta's confidence man
In November 2016, PSC's leader Miquel Iceta appointed him for the position of Secretary for Organization. Illa was the highest-rank politician from among the PSC cadres who attended the "Prou! Recuperem el seny" anti-independence demonstration in Barcelona on 8 October 2017 organized by Societat Civil Catalana. He was part, along with Adriana Lastra and José Luis Ábalos, of the negotiating team of the PSOE that reached an agreement with ERC for their abstention in the investiture of Pedro Sánchez in January 2020.
On January 10, he was unveiled as prospective Minister of Health, in replacement of María Luisa Carcedo. He was appointed by King Felipe VI of Spain on January 13, taking oath before the Sovereign that day. Illa succeeded Carcedo in all the competencies relating public health affairs, but no in the competencies relating consumer affairs and social welfare. The appointment of Illa, with no experience in the health area, was defined by the media as a "manager", and that its possible role in the government was not just limited to the health portfolio but to act as a channel of communication with Catalan independentism.
Coronavirus pandemic
One of the first challenges faced by the minister was the outbreak of coronavirus in late 2019. In late January 2020, the Ministry of Health, in coordination with the Ministry of Foreign Affairs, started the process to repatriate around twenty Spaniards from China. On January 29 it was announced that they would be held into quarantine for 14 days in a military hospital of Madrid. In a joint operation with the government of the United Kingdom, they arrived to Spain on January 31 and they were discharged on February 13. The first case of coronavirus in Spain was recorded on January 31, 2020 in the island of La Gomera, in the Canary Islands. The patient, a part of a group of five people was taken into observation after had come into contact with a German man diagnosed with the virus. Since then, multiple cases were recorded. In concrete, in order to avoid more contagions, on February 25 the health authorities put a hotel in Tenerife under quarantine with around 1,000 people inside. The first mainland Spain case was recorded in Barcelona that day. Likewise, that day, the minister convene an extraordinary meeting of the Interterritorial Council of the National Health System for February 25, the second since he assumed the office. On March 3, 2020, the health authorities announced that a post-mortem test proved that the first coronavirus death in Spain occurred on February 13, 2020. That day, the health ministry supended all medical conferences indefinitely to ensure the availability of all medical professionals and it recommended sports teams playing against Italian teams to be played without fans. On March 10, the central government, led by the Health Ministry, adopted more serious measures. Among them, there were halting flights to Italy and banning large scale gatherings in Madrid, Basque Country and La Rioja. This measures were complemented with other ones taken by regional governments such as shut down schools by the regional governments of Madrid, the Basque Country and La Rioja, as well as the suspension of the Fallas by the valencian government, after the recommendation of the Ministry of Health. Following the health crisis caused by COVID-19, various media have reported that he has temporarily moved to live at the Moncloa Palace.