Er was the Member of Parliament (MP) for the Bakri constituency in the State of Johor for two terms from 2008 to 2018.
He is a member of the Democratic Action Party (DAP), a component party in the Pakatan Harapan (PH) ruling coalition.The Star columnist Lee Yuk Peng has said that Er has impacted parliament with his "efforts to bring issues close to the heart for parliamentary deliberation" and had the "reputation of being a hard working and dedicated MP" prepared to ask questions in parliament despite his lack of proficiency in Malay.