The Railway Policing (Scotland) Bill is the first step towards the national force taking on the responsibilities of British Transport Police in Scotland.
Members of the justice committee have endorsed the bill, although they were split on the final recommendation.
The Conservatives and Labour both argued against the merger, citing concerns raised by BTP and unions.
MSPs agreed to the general principles of the legislation by 66 votes to 44, with the Greens and Lib Dems backing the SNP - although the Lib Dems incidated they would seek to make amendments at committee stage.
The Scottish government has long wanted to integrate railway policing services into the single national force, and tabled a bill to that end in December 2016.
The Railway Policing (Scotland) Bill would confer extra powers on the Scottish Police Authority and the Police Service of Scotland, but further legislation would be needed at Holyrood and Westminster to transfer staff, properties and cross-border policing functions.
A report from the justice committee backed the general principles of the bill, but members were split after hearing the majority of respondents to their inquiries oppose the plans.
Witnesses including BTP chief constable Paul Crowther have warned that a merger could prove a "real challenge", saying it could cause a "significant outflow of expertise", but Police Scotland have said a merger would be "complicated but not insurmountable".
Transport Minister Humza Yousaf said he was "very pleased" with the progress of the bill, adding that the government had "listened closely" to concerns.
He said: "Integrating the BTP in Scotland into Police Scotland will further enhance the safety of passengers and railway staff and our plans will provide railway policing which is more accountable to the people of Scotland.
"The bill will also provide more joined up service across our key infrastructure and with local community policing."
The Conservatives and Scottish Labour have opposed the merger, and voted against backing it in the justice committee and the chamber. However, Lib Dem and Green MSPs on the committee supported the bill and in the chamber, despite some voicing concerns.
Scottish Conservative justice spokesman Douglas Ross spoke out against the merger, describing it as an "utterly needless move, inspired by nationalism rather than national security".
And his Tory colleague Oliver Mundell added: "This is just another ill-thought out power grab, driven not by logic but by an ideological and constitutional obsession with control. It's change for change's sake."
Labour's justice spokeswoman Claire Baker said the government seemed "determined to railroad its bill through parliament", and called on them to halt the plans.
She said: "We have heard numerous concerns from BTP, staff, unions and railway providers that haven't been fully addressed by the SNP. There are clear operational and serious financial questions that remain unanswered by the government.
"We already have in Scotland a transport policing system that works and serves us well, but this Bill risks that. With concerns over the financial memorandum attached to this bill, this could prove to be a costly way to fix a problem that isn't broken."
Scottish Green MSP John Finnie, who backed the plans in the justice committee, acknowledged concerns but said there would be an entirely co-ordinated system if the proposals went ahead.
Lib Dem member Liam McArthur said the merger was the "biggest risk" among options put forward, but said the bill should be allowed to progress to the next stage to allow ministers to address concerns.
Earlier, Mike Hogg of the RMT union said the merger made "no logical or financial sense". He told the BBC's Good Morning Scotland programme: "We think there is a real danger of losing that expertise. We fear that the British Transport Police will be swallowed up."
During the stage one debate, Mr Yousaf said there had been "constructive" talks with unions over the plans.
MSPs are to debate legislation aimed at integrating railway policing into Police Scotland for the first time.