The bill will allow refugees to live and work in Australia for three to five years, but denies them permanent protection.
It was passed by 34 votes to 32 after intense debate in a late-night sitting, informs Report citing BBCNews.
Australia currently detains all asylum seekers who arrive by boat, holding them in offshore processing camps.
It says that those found to be refugees will not be permanently resettled in Australia, under tough new policies aimed at ending the flow of boats.
It also has a backlog of cases - about 30,000 - relating to asylum seekers who arrived before the current policies were put in place. Those people live in detention camps or in the community under bridging visas that do not allow them to work.
To secure enough support in parliament to pass the bill, the government made concessions. Children will be freed from detention on Christmas Island, an offshore camp where conditions have been strongly criticised.
The number of confirmed refugees Australia will agree to accommodate will rise by 7,500, from the current level of 13,750, by 2018 (reversing an earlier cut). Asylum seekers on bridging visas will be allowed to work while their claims for refugee status are processed.
The bill becomes law on Friday when it is passed by the House of Representatives, where the government has a majority.
Prime Minister Tony Abbott described the move as "a win for Australia".