On 26 January 2019, Ramli firstly contested in
Cameron Highlands by-election and he was picked as candidate given that he was the direct member of BN. He went on to win the by-election and became the new Cameron Highlands MP. The election was held after the Election Court on 30 November 2018 declared the victory of the incumbent MP of BN and the
Malaysian Indian Congress (MIC),
Sivarraajh Chandran for the seat in the election null and void because it was found that corrupt practices had been committed in the
2018 general election (GE14). He won the by-election after defeating
M. Manogaran of
Democratic Action Party (DAP) from
Pakatan Harapan (PH) and two other independent candidates, Wong Seng Yee and Sallehudin Ab Talib, with a majority of 3,238 votes. He is the first ever indigenous
Orang Asli candidate to be elected into the
Dewan Rakyat as an MP, and marked history when he swore in at the Parliament wearing a
tempok and beginning his speech in the
Semai language. On 15 May 2020, he was appointed as Non-Executive Chairman of
Amanah Raya Berhad (ARB). On 1 March 2022, he was tasked to chair the Dewan Rakyat sitting as temporary Deputy Speaker of the Dewan Rakyat II replacing Azalina Othman Said and created history as the first ever Orang Asli deputy speaker although not being officially appointed to the position yet. He is however widely expected to be officially appointed in the next
Dewan Rakyat meeting after multiple postponements of the appointment on 14 September 2021 for the first time, 25 October 2021 for the second time, 1 March 2022 for the third time, 18 July 2022 for the fourth time and 3 October 2022 for the fifth time as well as his expected win in the contest for the position between him and former deputy speaker
Nga Kor Ming who is trying to make a comeback to the position. However on 3 October 2022 when
Minister in the Prime Minister's Department in charge of Parliament and Law
Wan Junaidi unveiled the fifth postponement of the appointment of the deputy speaker position, he also revealed that the
Pakatan Harapan (PH) opposition coalition did not nominate another candidate, in contrast with the previous news and hence the government was withdrawing its candidate. Although he was yet to be officially appointed as deputy speaker, the media has already referred him as the deputy speaker, suggesting falsely that he had been officially appointed to the position during the period of these multiple postponements. ==Election results==