On TRACK: Transport Minister Keith Brown and ScotRail deputy managing director Kenny McPhail surf the web as they launch a wi-fi pilot on a train. Picture: Jamie Simpson
The £250,000 pilot will give customers free web access on the commuter route connecting Queen Street station and Waverley Station via Falkirk High.
If successful, ministers hope to see wi-fi introduced across the country's rail network.
Four of ScotRail's Class 170 trains have been kitted out for the trial, which will see one in 10 services on the Glasgow-Edinburgh Queen Street line served by wi-fi.
Transport Minister Keith Brown said: "I am delighted to kick off this wi-fi trial with ScotRail, which will play a massive part in ensuring future connectivity throughout Scotland's transport network.
"A major challenge for transport operators is how to ensure we embrace new technologies to allow passengers to get on with their busy lives while travelling.
"Business organisations have been very clear that wi-fi access on commuter routes would boost competitiveness in Scotland and this pilot is the first step to delivering that.
"We are working towards bringing the internet to every corner of Scotland, including ensuring people can get online even when they're on the move, be that commuting to and from work or travelling socially."
Liz Cameron, chief executive for Scottish Chambers of Commerce, welcomed the pilot for the business community.
She said: "This pilot project is an essential first step towards delivering the kind of connectivity that business needs in Scotland and we look forward to its extension to other routes as soon as possible."
The launch comes ahead of Mr Brown's statement to the Scottish Parliament later this week on the future of rail services in Scotland.
Both the current contract held by ScotRail for rail passenger services and the funding arrangements for Network Rail in Scotland will end in 2014.
Mr Brown said: "The Rail2014 consultation set out our stall with a vow to bring full wi-fi connection to train journeys and this pilot gets that under way.
"This will also help make train travel more attractive for many people and go towards driving up passenger numbers, a huge priority for this Scottish Government."