In DAP, he served as the Assistant National Publicity Secretary from September 2013 to March 2022, State Vice Chairman of Penang since December 2013 and Parliamentary Spokesperson of Education, Science and Technology.
[2] He is the son of Khir Johari, former federal minister and prominent politician from Barisan Nasional (BN) and Alliance.
In 2010, Zairil joined the DAP, a component party of Pakatan Rakyat (PR) in opposition to the BN and UMNO federal government.
The choice, given that his father was a prominent UMNO politician and that he would be a rare Malay member of the DAP, attracted significant attention.
"[5] On 23 February 2011, he was appointed the Political Secretary to Lim Guan Eng, the DAP Secretary-General and Chief Minister of Penang with immediate effect.
[9] In the 2015 state party convention, he was reelected into the committee, placing third highest out of the fifteen elected members with a total vote of 490 out of 760 delegates, he was reappointed to the same position.
[20] In the 2013 general election, Zairil won the Bukit Bendera parliamentary seat polling 45,591 votes defeating Barisan National candidate with 32,778 majority.
A new Penang State Executive Council was formed with Zairil being appointed member for Public Works, Utilities and Flood Mitigation.
[25] In December 2018, Zairil married lawyer and political activist Dyana Sofya Mohd Daud who was also a candidate in the 2014 Telok Intan by-election.
[32] Zairil has also published book chapters in Secularism, Religion, and Democracy in Southeast Asia by Vidhu Verma,[33] Policies and Politics in Malaysian Education: Education Reforms, Nationalism and Neoliberalism by Cynthia Joseph,[34] Dialog: Thoughts on Tunku's Timeless Thinking by the think tank IDEAS,[35] and Young and Malay: Growing up in Multicultural Malaysia by Ooi Kee Beng and Wan Hamidi Hamid.