Dutch rail operator Abellio will run ScotRail services from April 2015, after promising to invest millions in improving services.
It will take over from Aberdeen-based FirstGroup, which has run most Scottish rail services for the past 10 years.
Abellio has also pledged to deliver a better deal for ScotRail workers.
Unions and Scottish Labour reacted angrily to the announcement, saying there was support for services to be put into public ownership.
They had called for the suspension of the franchising process, in the hope such a move would have been permitted under new devolved powers due to come to the Scottish Parliament.
FirstGroup had been competing against Abellio, Arriva, MTR, and National Express for the right to operate the ScotRail contract.
Scottish Transport Minister Keith Brown said the franchise, worth up to £6bn, would run for 10 years, with a provision for the government to cancel the contract at the halfway point, if Abellio - a subsidiary of the Dutch national rail company Nederlandse Spoorwegen - failed to meet its obligations.
Abellio and the government said the deal would deliver improved services for passengers, including:
- Fares between any two Scottish cities starting at £5 (starting at £7.50 for first class)
- Reduced fares for jobseekers
- Free wifi internet connections on all trains
- 23% more carriages across the network.
- A Dutch-style cycle/rail network
And for ScotRail staff, the government also said the new contract would result in:
- A guarantee of no compulsory redundancies throughout the life of the contract
- A commitment to earnings of at least the living wage for all staff and subcontractors
- Protection of rail staff pensions and travel rights
- At least 100 apprenticeships
- Trade union representation at franchise board meetings.
Mr Brown said: "The Scottish government believes good public transport improves the lives of the people and the economy of Scotland.
"Following extensive consultation by the Scottish government, Scotland's railway has attracted a world leading contract to deliver for rail staff and passengers."
The minister added: "We've already ensured that regulated rail fares will stay in line with inflation or less, and Abellio has come up with some truly innovative ways to make rail even more affordable, such as the £5 intercity fare anywhere in Scotland and reduced ticket prices for jobseekers and those newly in work, as well as a price promise for guaranteed best value fares."
David Miller, BBC Scotland transport correspondent
New trains, more seats, bargain fares.
Going Dutch will mean all change for ScotRail passengers. Eventually.
Abellio will run the franchise from April 2015.
But many of the changes promised today won't be arriving at a platform near you anytime soon.
It will be the end of December 2017 before new trains appear on the Edinburgh to Glasgow line.
The refurbished high speed trains which will serve Aberdeen and Inverness are due by the end of 2018.
This is a ten year deal which we now know is worth up to £6 billion.
It's the biggest single contract ever awarded by the Scottish Government.
So the pressure is on to ensure passengers, and taxpayers, are happy with the outcome.
The unions though are unimpressed by the promise of free wifi on all services and bike hire schemes at stations.
They want to see rail services in Scotland back in the public sector.
A clause which allows the franchise agreement to be ended after five years offers them a slight glimmer of hope.
Abellio chief executive Jeff Hoogesteger said: "This is a huge day for Abellio and indeed the Netherlands, which has such a rich history of commercial and cultural trade with Scotland.
"For two years our team has been on a journey across Scotland and met people from the Borders, across the seven cities and to the very peak of the far north line, so that we could prepare a plan that would meet and exceed the expectations of the Scottish government.
"We look forward to delivering significant new benefits for passengers under the next franchise."
The company has indicated that its preferred bidder to build new rolling stock will be Hitachi, and the trains will be made in the UK.
Mick Whelan, the general secretary of the train drivers' union Aslef hit out at the franchise decision. He said: "It's a particularly perverse decision by the SNP government in Scotland, which was arguing for independence, and is getting many more devolved powers, to embrace privatisation and all that means rather than wait a few months, take a fresh look at the opportunities for rail services in Scotland, and then, instead of acting in such a precipitate fashion, make a considered decision next year. "
Manuel Cortes, leader of the TSSA rail union, added: "Only a few weeks ago, the Scottish people were promised the power to run a publicly owned railway which would put them first, ahead of private rail firms.
"Now the Scottish government wants to hand that railway to a firm run by Dutch state railways."
And RMT general secretary Mick Cash told BBC Scotland: "We believe public ownership is better, is more efficient and it's safer and it gives you great accountability.
"All you're seeing in private ownership is that money's being sucked out of the industry and given to the private sector shareholders, or in this case is going to go to subsidise the Dutch railways."
Scottish Labour infrastructure spokesman James Kelly said the decision highlighted a "total failure in leadership" from the transport minster.
"In awarding the ScotRail franchise to Abellio, Keith Brown has decided that the profits from Scotland's railways should be used to invest in lower fares and better services in Holland rather than here at home," he said.
But Scottish Conservative transport spokesman Alex Johnstone said the competitive franchising system had revived rail transport, adding: "The transport minister has done well to resist calls from the sirens of the extreme left who would see us return to the investment vacuum and the catastrophic management failures of the state-owned monopoly."
Scottish Green co-leader Patrick Harvie, added: "There is a certain irony in the Dutch public sector running Scotland's trains, but Abellio has certainly made a strong set of promises for improving services.
"There's huge public appetite for bringing rail back into public hands, and I think it's realistic to start preparing for a public sector bid in 2020 if those powers are in our hands by that point."
Meanwhile, FirstGroup chief executive Tim O'Toole said the firm was "very proud" of its success in operating First ScotRail.
He added: "We have kept our promises and more for 10 years, delivering record levels of service including during this extraordinary summer in Scotland with the Commonwealth Games and the Ryder Cup.
"Our bid would have delivered even greater levels of service and growth, and we are disappointed we will not have the opportunity to implement the credible plans we submitted, building on our record of improvement across every measurable score, for the benefit of ScotRail's passengers and employees."
The firm said it was still in discussions with the Department for Transport (DfT) over the First TransPennine Express and First Great Western franchises.