It is the first time in decades that an Australian government has lost a vote on a substantive piece of legislation, sparking applause and cheers from observers in the parliamentary viewing gallery in Canberra.
On Tuesday, non-government MPs secured enough votes to pass a bill making it easier for sick refugees held offshore to be treated in the country.
The fast-tracked medical transfers will only apply to the existing cohort of refugees and asylum seekers on Manus Island and Nauru.
"Have no doubt this man sitting opposite me is not fit to be the prime minister of this country", Mr Dutton said of the Opposition Leader.
The Bill, which is an amendment to government legislation, was first passed by the Upper House in December, and will return to the Senate for a vote on Wednesday after several changes were made to it.
Prime Minister Scott Morrison before losing the vote on Tuesday night.
"My job now is to ensure that the boats don't come", he told reporters at Parliament House.
Morrison last week ruled out calling a snap election if his government was defeated over the "stupid" bill.
Australia's Prime Minister Scott Morrison announced on Wednesday the reopening of the Christmas Island immigration detention center.
At its peak in 2010, nearly 2500 people were held there as Australia faced unprecedented numbers of asylum-seeker boat arrivals.
The ruling coalition lost its single-seat majority when former Prime Minister Malcolm Turnbull quit politics after he was deposed by his party colleagues in August.
Refugee advocates applaud the law that they regard as a more humanitarian approach toward asylum seekers.
No matter the detail of the medical evacuation Bill passed by Parliament tonight, the Labor Party can never win a political fight on border security.
The changes included a provision that only the 1,000 asylum seekers now held on Nauru and Papua New Guinea and not any future arrivals would be considered for medical evacuation under the new regime.
The vote in favour of the Bill came amid growing concern about the well-being of asylum seekers sent to Nauru and Papua New Guinea, with reports of abuse, suicide and lengthy detention periods.
"If we're re-elected it won't apply to anybody because I will reverse it", he said.
Mr Shorten proposed a deadline of three days for each decision to transfer a refugee to Australia for medical treatment, scaling back Labor's initial deadline of one week.
"In a number of those cases, the delay in accessing medical treatment risked life-threatening consequences for the children and adults concerned", she added.
"Where we will always stand, and the Australian people can always trust us to do, is to have the mettle to ensure the integrity of our border protection framework".