State Deputy Chairman of UMNO of Melaka & Division Chief of UMNO of Tangga Batu (2018–2023)
On 14 July 2018, Mohamad Ali was appointed the Melaka UMNO State Deputy Chairman. In the 2023 UMNO party elections on 18 March 2023, Mohamad Ali was not reelected as the Tangga Batu UMNO Division Chief after narrowly losing to Member of the Melaka State Executive Council (EXCO) and Member of the Melaka State Legislative Assembly (MLA) for Paya RumputRais Yasin. However, the results has been controversial and disputed by Mohamad Ali. The results also resulted in the boycott and absence of most of the committee members in the first meeting of Tangga Batu UMNO Division after Rais was elected as its new Chief, alleged sex scandal of Rais and him being replaced with Rais as the Melaka UMNO State Deputy Chairman on 22 March 2023.
Senator & Deputy President of the Dewan Negara (2020–2023)
On 20 May 2020, Mohamad Ali was elected to the Parliament as a Senator representing Melaka after being nominated and approved by the Malacca State Legislative Assembly. On 16 December 2020, he was appointed the 14th and new Deputy President of the Dewan Negara, deputising for President Rais Yatim and replacing Abdul Halim Abdul Samad. On 19 May 2023, he stepped down as Deputy President of the Dewan Negara and Senator following the expiration of his 3-year term.
Candidate for the Member of the Melaka State Legislative Assembly (2021)
In the 2021 Melaka state election, Mohamad Ali made his electoral debut after being nominated by BN to contest the Sungai Udang state seat. He was not elected as the Sungai Udang MLA after narrowly losing to Mohd Aleef Yusof of Perikatan Nasional (PN) by a minority of only 530 votes. Following his narrow electoral defeat, he filed an election petition to challenge the results.