Scotland transportation had invited the union and other political parties regarding on having a public sector train.
Humza Yousaf revealed the move after widespread criticism of existing ScotRail services. He said the contract could be cancelled in 2020 and contingency plans were in place for the Scottish government to take over train services earlier.
Dutch firm Abellio took over the ScotRail franchise in April last year in a 10-year deal worth up to £6bn but with the option for the Scottish government to cancel it at the halfway point.
Since then it has been regularly criticised over punctuality and reliability, with a broken-down train in Edinburgh last week causing widespread disruption. Abellio could be stripped of the contract if punctuality dipped below 84.3% for three consecutive months.
According to the latest performance data from ScotRail, 86% of trains were on time or less than five minutes late between 16 October and 12 November.
Mr Yousaf confirmed the Scottish government's preference for a public sector operator to run the service, suggesting this could happen from 2020 when there is a break point in the contract. Mr Yousaf refused be drawn on whether he favoured nationalising the railways in Scotland, pointing out that the Scottish Parliament does not currently have that power.
The SNP has previously promised to open up the rail franchise to public sector bids, under powers devolved in the Scotland Act 2016.
A ScotRail Alliance spokesperson said: "We are concentrating on delivering rail services as detailed in our Performance Improvement Plan, which contains 246 individual actions to make things better, every single day.
Scottish Labour's transport spokesman Neil Bibby said: "Instead of questioning the motivations of trade unionists working on the railways, the SNP transport minister should hold his hands up and accept responsibility for his failure to deliver a railway network that passengers in Scotland deserve.
Join the Conversation