Member of Parliament for Pontian (2004–2008) Hasni was first elected to
Malaysian Parliament as the MP of Pontian in the
2004 general election (GE11).
Member of the Johor State Legislative Assembly for Benut (since 2008) In the
2008 general election (GE12), he was elected as the Member of the Johor State Legislative Assembly for Benut. He managed to retain the seat in the
2013 (GE13) and
2018 (GE14) general elections. In the
2022 Johor state election, he was reelected as the Benut assemblyman for his 4th consecutive term by defeating all of his 3 opponents, Isa Abdul Hamid from
Perikatan Nasional (PN), Haniff Ghazali Hosman from
Pakatan Harapan (PH) and Iskandar Noor Ibrahim from
Homeland Fighters Party (PEJUANG) with a majority of 5,859 votes.
Member of the Johor State Executive Council (2013–2018) He was appointed an EXCO member by former Menteri Besar
Mohamed Khaled Nordin.
Leader of the Opposition of Johor (2018–2020) But in the aftermath GE14 which saw the fall of BN coalition government, he was elected the
Opposition Leader of Johor from 2018 to 2020.
Menteri Besar of Johor (2020–2022) On 28 February 2020, he was sworn in as the new Menteri Besar by the
Sultan Ibrahim Ismail, replacing the incumbent Dato' Dr.
Sahruddin Jamal after the collapse of
Pakatan Harapan (PH) state government during the
2020 Malaysian political crisis. In the
Johor state election on 12 March 2022, he led his coalition to a huge and landslide victory in the
2022 Johor state election, winning 40 out of 56 state seats, giving him a two-thirds majority to form the next state government with a much stronger mandate after he lost the majority with only 28 seats in the assembly following the death of Kempas assemblyman
Osman Sapian and strengthening his grip on power and position as Menteri Besar of Johor. BN Chairman and UMNO President
Ahmad Zahid Hamidi also added that he would submit the name of Hasni to the Sultan of Johor for his reappointment to the position. However, on 14 March 2022, Hasni suddenly announced his withdrawal from the running for the position by stating that he would pave way and endorse a younger candidate to lead the state government citing long term development for Johor and the next day on 15 March 2022, caretaker EXCO member and new
Machap MLA
Onn Hafiz Ghazi was sworn in as the new and 19th Menteri Besar to take over him after his 2 years in office.
Member of Parliament for Simpang Renggam (since 2022) In the
2022 general election, Hasni wrested the
Simpang Renggam seat in
Johor from
Maszlee Malik of
PH with a majority of 1,821 votes. ==Election results==