The First Minister faced questions on the railway operator’s recent level of cancellations and delays, which she said were “unacceptable”.
Past performance issues have led to ScotRail being issued with two remedial notices since December and it is due to publish a plan to address them in the coming days.
At First Minister’s Questions, SNP MSP Christine Grahame said: “Plans don’t drive trains.
“Isn’t it time the Scottish Government told ScotRail Abellio that it is in the last chance saloon?”
“ScotRail should treat a remedial plan very much as a last chance saloon - that’s the very nature of it,” Ms Sturgeon replied.
“ScotRail has been left in no doubt that its recent performance, particularly in the Borders and Fife, have been completely unacceptable.”
She added: “In the event ScotRail does not achieve improve performance or fails to deliver on its contractual commitments, it does of course run the risk of the franchise being terminated early.”
Conservative Rachael Hamilton also questioned the First Minister about ScotRail cancellations.
The Ettrick, Roxburgh and Berwickshire MSP read out a letter from a constituent who said he is fined by his child’s nursery and experiences “significant stress and anxiety” due to being late for work because of cancelled trains.
He wrote: “It has come to the point where there is genuine surprise that the train is running on time, as opposed to it being so frequently cancelled.”
Ms Sturgeon said some of the reasons behind the problems were due to train delivery, training and “failings” from track operator Network Rail.
She added: “It is ScotRail’s responsibility to make sure that they live up to their performance levels.
“That’s why the remedial plan is so important and why ScotRail has to understand how serious the obligation is on them to deliver on the commitments they make in it.”
ScotRail was issued with a second remedial notice on February 8, having been served a first on December 24 last year.
The notice requires ScotRail to submit a plan within 12 weeks on how it will address performance issues raised.
Transport Scotland said the decision was taken to issue the second notice after the franchise scored 79% in its National Rail Passenger Survey (NRPS) results.
Under the terms of the franchise agreement, ScotRail is contractually obliged to reach an overall 88.5% NPRS average target.
In November, MSPs voted by 85 to 34 against a Scottish Labour motion calling for the Scottish Government to enact a break clause in Abellio’s ScotRail contract.
Dutch firm Abellio was awarded the 10-year franchise worth up to £6 billion in 2014.