Born as a son of a Malayan Railway worker in Ipoh, Perak, Shaziman was raised in Tampin, Negeri Sembilan, receiving primary education at Tunku Besar Tampin Primary School. He holds a Bachelor of Science in Civil Engineering from Tri-State University (now Trine University), Angola, Indiana, USA and a Diploma in Civil Engineering from Universiti Teknologi Malaysia.
Shaziman entered Malaysian politics in 1991, at the age of 27 years, as a member of the Tampin Bandar branch of UMNO in Tampin. Shaziman rose within the ranks of UMNO until he was picked as the head of UMNO Youth in 1997, followed by his appointment as the head of Tampin UMNO in 2001.
Shaziman was chosen as a candidate for the 1999 Malaysian general election, contesting for the Tampin parliamentary seat against PAS' Hamdan Hashim and winning by a majority of 9,979 votes. Shaziman successfully retained his seat in the next two general elections, defeating Abdul Razakek Abdul Rahim of PAS in 2004 and 2008. In 2004, Shaziman won by a clear majority of 18,084 votes (against 5,852 votes for Abdul Razakek); 2008 saw a lower share of votes in favour of Shaziman, with 13,079 votes (against 10,943 votes for Abdul Razakek).
After the 2004 general election, Shaziman was included into the Cabinet of Malaysia as the Deputy Minister of Energy, Water and Communications, under the leadership of Energy, Water and Communications Minister Lim Keng Yaik. Following Lim's announcement of his retirement as the President of Parti Gerakan Rakyat Malaysia in 2007, Shaziman was promoted as the new Minister of Energy, Water and Communications on 18 March 2008.
Since assuming the role of Deputy Minister of Energy, Water and Communications in 2004, Shaziman has expressed views against anonymous bloggers whom he accuses of "[spreading] negative or malicious content on the Internet" which "could harm the country's security". In a weekly Parliament meeting on 23 August 2006, Shaziman branded anonymous bloggers "penembak curi", a Malay term for "snipers", and challenged said bloggers to step forth and debate issues they are dissatisfied with:
In a later Parliament meeting held on 4 April 2007, Shaziman expressed the idea of compulsory registration for bloggers whose blogs are hosted on local servers, one of several measures the Government was considering to curb publication of malicious materials on the Internet, adding the ministry does not have any problem with bloggers who identified themselves but reiterating his view of welcoming blogging activities. Deputy Prime Minister Najib Tun Razak sided Shaziman, stating bloggers have made the "business of government more challenging" and in certain cases, caused unnecessary distraction.
Shaziman's suggestion on 4 April drew flak from a member of the Opposition, as well as two prominent bloggers, Jeff Ooi and Ahiruddin Attan, both of whom have been sued by the New Straits Times Press in January 2007. Democratic Action Party (DAP) leader Lim Kit Siang, who interjected when Shaziman was speaking in Parliament, claimed the government ministries' negative view of bloggers "reflected their lack of understanding about information flow" when foreign politicians already have their own blogs. Blogger and activist Marina Mahathir stated the move will only ridicule the government in the international community and told the Government to "get real", while Ahiruddin has stated the proposed measure undermines the country's no-censorship policy with regards to the Internet, and creates fear among bloggers, who will in turn decide to host their blogs overseas. Jeff Ooi questioned the need for blogger registration when a Communications and Multimedia Content Forum dealing with complaints by any party was already put in place by the Malaysian Communications and Multimedia Commission (MCMC) since the introduction of the Communications and Multimedia Act in 1998, and claims the proposal goes against global trends and will stifle development of local web content.