Prior to the 1996 federal election, aged 28, Shorten contested Labor preselection for the Division of Maribyrnong. He was defeated by Bob Sercombe, who went on to retain the seat for Labor at the election. In February 1998, Shorten won preselection for the safe Labor seat of Melton at the 1999 state election. He was not a resident of the electorate, located on the rural–urban fringe to Melbourne's north-west. He subsequently resigned as a candidate in order to become state secretary of the AWU.