Mahathir was born in Alor Setar, Kedah, the youngest of nine children of a schoolteacher and a housewife. His father, Mohamad Iskandar, was of Indian descent, being the son of a Malayalee Muslim (who migrated from Kerala) and a Malay mother, while Mahathir's own mother, Datin Wan Tempawan Wan Hanafi, was Malay.
During World War II, Japanese occupation of Malaya, he sold pisang goreng (banana fritters) and other snacks to supplement his family income. Mahathir attended a Malay vernacular school before continuing his education at the Sultan Abdul Hamid College in Alor Star. Mahathir then attended the King Edward VII Medical College (the predecessor of present-day University of Malaya and thus National University of Singapore) in Singapore, where he edited a medical student magazine called The Cauldron; he also contributed to The Straits Times newspaper pseudonymously under the nickname "C.H.E. Det". Mahathir was also President of the Muslim Society in the college. Upon graduation in 1953, Mahathir joined the then Malayan government service as a medical officer. He married Siti Hasmah Mohd Ali—a fellow doctor and former classmate in college—on 5 August 1956, and left government service in 1957 to set up his own private practice in Alor Star. Mahathir thrived in private practice, and allowed him to own by 1959 a Pontiac Catalina and employ an ethnic Chinese chauffeur (at the time, almost all chauffeurs in Malaysia were Malays, owing to the economic dominance of the ethnic Chinese). Some critics have suggested this foreshadowed a later hallmark of Mahathir's politics, which focused on the "cultivation of such emblems of power".
From his marriage with Tun Dr. Siti Hasmah binti Haji Mohamad Ali, they have seven children, four sons and three daughters: Marina Mahathir, Mirzan Mahathir, Melinda Mahathir, Mokhzani Mahathir, Mukhriz Mahathir, Maizura Mahathir and Mazhar Mahathir. Both Mukhriz and Mokhzani  are involved in business as well as in politics while their eldest daughter Marina is a prominent local writer and AIDS activist.
He successfully underwent a heart bypass operation in 1989 at age 63.
 Political careerIn the third general election of 1964, Mahathir was elected Member of Parliament for Kota Setar Selatan defeating the Pan-Malaysian Islamic Party's (PAS) candidate with a 60.2% majority. He lost the seat in the following general election in 1969 by a mere 989 votes to PAS's candidate, Yusof Rawa.
Following the race riots of 13 May 1969, Mahathir was sacked from the UMNO Supreme Council on 12 July, following his widespread distribution to the public of his letter to Tunku Abdul Rahman, the Prime Minister at that time. In his letter, he had criticised the manner in which Tunku Abdul Rahman had handled the country's administration which was believed to favour the ethnic Chinese. Dr. Mahathir was subsequently relieved of his party membership on 26 September.
While in the political wilderness, Mahathir wrote his book, "The Malay Dilemma" in which he sought to explain the causes of the 13 May Incident in Kuala Lumpur and the reasons for the Malays' lack of economic progress within their own country. The book, published in 1970, was promptly banned by the Tunku Abdul Rahman government. The ban on his book was eventually lifted after Mahathir became Prime Minister in 1981.
Mahathir rejoined UMNO on 7 March 1972, and was appointed as Senator in 1973. He relinquished the senatorship post in 1974 in order to contest in the general elections where he was returned unopposed in the constituency of Kubang Pasu, and was appointed as the Minister of Education. In 1975, he became one of the three vice-presidents of UMNO, after winning the seat by 47 votes. Tun Hussein Onn appointed Mahathir as Deputy Prime Minister on 15 September 1978, and in a Cabinet reshuffle, appointed him concurrently as the Minister of Trade and Industry.
Mahathir had announced that he has resigned from UMNO, the backbone of the ruling party, the Barisan National on 19 May 2008 which coincides with the vesak Day celebration.
 Prime ministerMahathir became the Prime Minister of Malaysia on 16 July 1981 when Tun Hussein Onn stepped down due to health reasons. He was the nation's first Prime Minister that came from a modest social background, whereas the first three prime ministers were members of the royal or elite families.
After 22 years in office, Mahathir retired on 31 October 2003, making him one of Asia's longest-serving political leaders. Upon his retirement on 31 October 2003, Mahathir was awarded a "Tun"-ship, Malaysia's highest civilian honour.
 Deputy Prime Ministers
- Tun Musa Hitam 1981-1986
- Tun Ghafar Baba 1986-1993, appointed by Mahathir
- Dato' Seri Anwar Ibrahim 1993-1998
- Tun Abdullah Ahmad Badawi 1999-2003, appointed by Mahathir
 Major constitutional changesIn 1983 and 1991, he took on the federal and state monarchies, removing the royal veto and royal immunity from prosecution. Prior to this amendment of the law, royal assent was required in order for any bill to pass into law. With effect of this amendment, approval by parliament could be legally considered as royal assent after a period of 30 days, notwithstanding the views of the monarchs.
 Intervention into the Malaysian JudiciaryIn 1988 when the future of the ruling party UMNO was about to be decided in the Supreme Court (it had just been de-registered as an illegal society in the High Court), he was believed to have engineered the dismissal of the Lord President of the Supreme Court, Salleh Abas, and three other supreme court justices who tried to block the misconduct hearings. The series of incidents in 1988 has been widely viewed as the end of the Malaysian judiciary's independence from the executive.
On 1 January 1995 jury trials and trials with assessors were abolished throughout Malaysia