The move follows a previous decision to terminate Abellio’s ten-year franchise for Scotland’s main train operator in March 2022 – three years early.
Mr Matheson said ScotRail would be run from then on by an arm’s length company owned and controlled by the Scottish Government through an “operator of last resort”.
However, he was unable to say how long that would continue.
The decision has been triggered by the UK Government scrapping the franchise system, which it controls, with no replacement yet announced.
ScotRail has been run by three firms since British Rail was privatised in 1997 – National Express, FirstGroup and Abellio
Mr Matheson said it would "not be appropriate” to extend the current franchise or award a contract to another firm.
There had been speculation last week that Abellio might be offered an extension to its franchise, which is being ended early because ministers refused to accept demands for extra money the company said it needed to run the contract until 2025.
While ScotRail’s performance suffered under Abellio, many of the problems were caused by factors outside its direct control, such as Network Rail infrastructure failures, late-delivered new trains and industrial action.
Punctuality was improving by the time Mr Matheson pulled the plug on the franchise in December 2019, and it has since risen significantly during the Covid pandemic, albeit largely because fewer trains are running and passenger numbers are down by 90 per cent.
Mr Matheson also announced that extra funding to cover the shortfall in revenue would continue until September.
A series of such “emergency measures agreements” have nearly doubled pubic support for ScotRail to almost £1 billion a year.
Mr Matheson said last week they would be extended until the franchise ends next March.
He said today: “I have repeatedly stated the current franchising system is no longer fit for purpose.
"Keith Williams, who led the UK rail review process, has also said that ‘franchising cannot continue in the way that it is today’.
"Yet, there is continued uncertainty about the form and timing of rail reform emerging from the UK Government review process, which is now a year overdue.
“It is high time the UK Government listened to our requests to place the future structure of Scottish’s railway in Scotland’s hands.
“In the meantime, with the current ScotRail franchise expected to end in March 2022, we need to take decisions about successor arrangements within the current legislative framework.
"We have for some time been considering the full range of options available under that framework for continuing services beyond the franchise expiry.
“Following a detailed assessment process and given the uncertainty caused by Covid 19, alongside the continuing delays to the UK Government white paper on rail reform, I have decided it would not be appropriate to award a franchise agreement to any party at this time, either through a competition or a direct award.
“That is why I have confirmed that, from the expiry of the current franchise, ScotRail services will be provided in public hands through a company wholly owned and controlled by the Scottish Government.
“ScotRail staff will transfer to the new Scottish Government owned entity, with their terms and conditions protected.”
Mick Cash, general secretary of the Rail, Maritime and Transport union, said: “We have long campaigned for the Scottish Government to utilise its existing powers and take Scotland’s rail passenger services into public ownership.
"Today’s announcement represents a clear victory for this campaign.
“Public ownership of ScotRail will deliver significant benefits for Scotland’s rail workers, passengers and taxpayers and help enable the creation of an affordable, accessible and sustainable rail network.”
Kevin Lindsay, Scotland organiser of the train drivers’ union Aslef, said: “We welcome the beginning of the end of the failed franchise system in Scotland.
"However, never again should the people’s railway ever be in the hands of the privateers.
"This move starts the end of franchising, and the end of a failed Tory experiment."
Transport Salaried Staffs’ Association general secretary Manuel Cortes said “I’m delighted to see the SNP has finally listened to representations from the TSSA, Scottish Labour, passengers and staff alike and announced the return of ScotRail to the public sector.
“Welsh Labour showed the way when they nationalised the railways earlier this year.
“The rest of the country must now follow Welsh Labour's lead and end the Tories’ Frankenstein privatisation failure.”
Scottish Labour transport spokesperson Alex Rowley said: “It is welcome news the SNP have finally seen the light and decided nationalisation of our railways is the best way forward.
“When SNP ministers awarded the contract to Abellio they told us we would have world-leading services, but for far too many that was not the experience.
"So rail users have been let down in yet another failure from this SNP government.
“The Scottish Government could have acted on this much earlier, and it is their repeated failures that have led us to this point.
"They must now guarantee that they can get their act together and deliver a public sector operator that protects staff, delivers excellent value for travellers, and ensures our rail system is a fit-for-purpose, truly world-leading service in the years to come.”
Scottish Conservative transport spokesperson Graham Simpson said: "The SNP Government must be entirely honest about how much this will cost taxpayers and clear about what demonstrable benefits it is expected to bring to passengers.
"It is important that this is being motivated by pragmatism not ideology.”
Scottish Greens transport spokesperson John Finnie said: “Greens have long called for public ownership of our railways, so we welcome this progress from the Scottish Government.
"Nationalisation of services is just the first step towards a greener, integrated public transport system which serves communities not shareholders.”