Compston, who has played DI Steve Arnott in the police drama since the first episode in 2012, said the first minister was "by far the most competent leader on these islands".
He made the appeal in an online rally for the SNP shortly before the finale of the sixth series was due to air on BBC One at 9pm on Sunday.
The 36-year-old appeared alongside other high-profile supporters of Ms Sturgeon, including actors Alan Cumming and Brian Cox, crime writer Val McDermid and Mogwai musician Stuart Braithwaite.
He told voters: "Scotland's future is in your hands. Don't leave it to chance.
"The only way to make sure we re-elect Nicola Sturgeon as First Minister is to make it both votes SNP.
"Make sure you and all your pals get out to vote."
Referring to the coronavirus pandemic, he added: "I think even people who don't like Nicola Sturgeon, for whatever reason, have had to admit that she has been by far the most competent leader on these islands dealing with this crisis.
"And she's the one I think is best placed to take us forward getting out of it.
"So, I do really think that we are in a situation now where we need the best people, the most competent people, in charge of Scotland. To make sure that we come out of this a better place than we went in."
Compston, who was born and raised in Greenock but now lives in the US with his American wife, said: "Everyone is allowed an opinion. Whether that be politicians down south or some lovely incredible entertainers who have moved abroad for whatever reason.
"Myself, I've lived across the world. That's the beauty of free speech. Everyone is allowed an opinion. But what matters is votes."
Compston's intervention in the Scottish election campaign came hours after he surprised some of his fans by speaking in his natural accent on Saturday's Jonathan Ross show.
He won his first acting part in Ken Loach’s 2002 coming-of-age film Sweet Sixteen and went on to appear in the BBC TV series Monarch of the Glen.
Additional reporting by Press Association
Join our new commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies