KUALA LUMPUR, Malaysia—Malaysia’s former leader Mahathir Mohamad is quitting the country’s ruling party, saying he didn’t want to be associated with a group that he said is seen as supporting corruption under the leadership of Prime Minister Najib Razak.

The country’s longest-serving leader has been a staunch critic of Mr. Najib. He remains an influential figure in Malaysia for the way he helped engineer decades of economic growth.

...