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.
Morrison last week ruled out calling a snap election if his government was defeated over the "stupid" bill. "If they do come, you can thank the Labour Party and (opposition leader) Bill Shorten".
Australia's conservative minority government suffered a monumental political defeat on Tuesday, becoming the first administration in almost a century to lose a vote on major legislation and fuelling calls for a snap election.
A dozen refugees have already died in the Manus and Nauru camps and a number have attempted suicide, including children.
The push to speed up medical evacuations was first made by independent MP Kerryn Phelps previous year after she won the Liberal Party stronghold of Wentworth when former PM Malcolm Turnbull was ousted in a party coup.
Prime Minister Scott Morrison has announced he will reopen the Christmas Island detention facility, ahead of the changes, to deal with a potential influx of illegal boat arrivals.
"My job now is to ensure that the boats don't come", he told reporters at Parliament House on Wednesday.
When the sitting government last lost a vote on substantive legislation in 1929, then prime minister Stanley Bruce immediately called an election, and lost it.
Australia has come under fire by the United Nations and human rights organizations for allowing asylum-seekers to languish for years on the Pacific island under inhumane conditions.More news: In Revolution anniversary speech, Rouhani lays claim to Bahrain, other neighbors
More news: Thomas Markle Shares Private Letter Allegedly Written By Meghan Markle
More news: Alexandria Ocasio-Cortez Pushes for a Green New Deal in Congress
"I believe that we can keep our borders secure, we can uphold national security but still treat people humanely", Shorten told Parliament.
"This is merely codifying something that the government itself says is happening now".
The people smuggling boat traffic has all but stopped in the past five years with the government promising that any refugees who arrive on Australian shores by boat will never be allowed to settle there.
The Labor proposal made it easier for refugees to get approved for medical transfer by making it more challenging for the Home Affairs Minister to reject their applications.
The amendments to the bill were introduced in Parliament back in December.
Sick asylum seekers often have to fight the Australian government in court for permission to be transferred to an Australian hospital.
"There is no question that people smugglers will be hearing very clearly that the policy in Australia has changed", Dutton said.
"Thank you to all of the many people who contributed to this remarkable community campaign", she wrote on social media.