Majaliwa was born into a Muslim family on 22 December 1960 in Mnacho village, Ruangwa District of Lindi Region. He completed his schooling from Kigonsera Secondary School in 1983. He then worked as teacher for sixteen years until 1999. Meanwhile, he obtained a teaching diploma from Mtwara Teacher Training College in 1993 and a Bachelor of Education from the University of Dar es Salaam in 1998. He then joined the trade union movement and served as district secretary and regional secretary in the Tanzania Teachers' Association between 1999 and 2006. He was tapped to become the district commissioner for Urambo district in 2006. He remained in this role until his election to Parliament in 2010.[1]
In the 2015 general election, Majaliwa was reelected from Ruangwa, defeating Omari Makota of the Civic United Front by a margin of 31,281 to 25,536 votes, taking 55% of the vote.[2]
After John Magufuli was sworn in as President of Tanzania following the 2015 general election, he appointed Majaliwa as prime minister on 19 November 2015.[3] His appointment was a surprise, even to himself, given he was a relative newcomer to electoral politics. His selection was attributed to his humility, honesty, work ethic as well as regional considerations - the new prime minister was expected to be from the southern part of the country, where Majaliwa is from. His experience in education as a teacher, trade unionist and deputy minister was also expected to be an asset in President Magufuli's stated desire to reform the sector. The opposition criticized his selection, citing his lack of experience.[4][5]