Even still, Mr Shorten believes the "incompetent and divided" Morrison government should call an election as soon as possible.
The vote drew cheers from asylum-seeker activists in parliament's public gallery but the upper house must approve the bill before it becomes law, so the defeat, though damaging for the government, does not trigger an immediate election.
The ruling Liberal National coalition was firmly opposed to the legislation, which it said would endanger national security, but it passed Australia's lower house by a vote of 75 to 74.
The bill was first mooted by independent MP Kerryn Phelps a year ago after she won the Liberal Party stronghold of Wentworth when former prime minister Malcolm Turnbull was ousted in a party coup.
Earlier this morning, Mr Morrison called a meeting of the National Security Committee after which he declared the Christmas Island detention facility will be reopened. The government of prime minister Arthur Fadden lost a symbolic budget vote in 1941 and immediately resigned.
A dozen refugees have already died in the Manus and Nauru camps and a number have attempted suicide, including children.
"Last night was not about an election - last night was about the simple proposition that Australia is strong enough to treat people humanely", he told reporters at Parliament House.
Australia's Prime Minister Scott Morrison announced on Wednesday the reopening of the Christmas Island immigration detention center. "Every arrival", he said.
Champions League: PSG inflicts Solskjaer’s 1st United loss
Premier League form counts for nothing and United came up short when really tested against PSG , even though the French side were missing Neymar and Cavani.
He also said police, the military and Australian Border Force have been working on "contingency plans" in the event laws related to asylum seekers in offshore detention are changed.
Labor leader Bill Shorten says his party is tough but fair on border control after it backed the bill. The government had similarly made the offer only available to refugees on the islands at the time to avoid attracting new asylum seekers, Shorten said.
Opponents pointed out that the bill applies only to people already on Nauru and Manus Island, meaning new arrivals would not be eligible for transfer to Australia.
"I'm standing between people smugglers and bringing a boat to Australia", he said. "This puts Australia back on the map for people smugglers and Bill Shorten has that on his shoulders".
What happened at Christmas Island previously?
Labor is framing its proposed penalties as a test for Scott Morrison after the prime minister voted against the banking commission 26 times.
Opposition health spokeswoman Catherine King said the powerful Australian Health Reform Commission would develop and oversee long-term reforms, with the overarching aim of ensuring every Australian can access affordable, high-quality health care.