SYDNEY—Conservative lawmaker Scott Morrison unseated Malcolm Turnbull in a party rebellion to become Australia’s prime minister, marking a rightward shift for the ruling coalition as it grapples with the rise of fringe parties akin to those that have realigned politics in the U.S. and Europe.

Mr. Morrison, 50 years old, seized the leadership of the Liberal Party—the country’s main conservative bloc—in a ballot of its lawmakers Friday, after voter surveys suggested the government was headed for defeat in elections due next...