Early life and career
Shahrir was born in Kuantan, Pahang, and attended local primary schools. He later attended the Malay College Kuala Kangsar for his secondary education. He went on to gain a B.Ec. from the University of Malaya in Statistics, and a Masters of Business Administration from the International Institute for Management Development in Lausanne, Switzerland.
In 1973 he became the youngest political secretary in the country when he became political secretary to Musa Hitam, later Deputy Prime Minister. After his tenure expired in 1975, he became political secretary to Prime Minister Tun Abdul Razak till 1976. Shahrir first ran for public office in the 1978 general election, when he won the Parliamentary seat of Johor Bahru. He was initially appointed Deputy Minister, of Trade and Industry, but later became minister of welfare, youth and sports, and in 1987 took up the post of Federal Territory Minister. He also served as political secretary to Prime Minister Tun Hussein Onn from 1983 to 1986. Shahrir was sacked that year in the events leading up to the 1988 Malaysian constitutional crisis. In 1988, Shahrir resigned from his Parliamentary seat, and ran for reelection in the resulting by-election as an independent.