Dark smoke billowed from a woodland area at the bottom of a narrow valley near Stonehaven, just south of the city of Aberdeen, after the ScotRail train derailed in the morning following heavy rain overnight.
Two air ambulances and about 30 emergency service vehicles could be seen in a field just above the site of the derailment, which appeared to be difficult to access. The stricken train could not be seen on television footage.
"My deepest condolences are with the loved ones of those who lost their lives in this tragic incident," said Sturgeon, first minister of Scotland's semi-autonomous government.
British Prime Minister Boris Johnson said he was saddened to learn of the "very serious incident" and his thoughts were with all those affected.
Police received reports of a train derailing near Stonehaven, 15 km (9 miles) south of Aberdeen, at 0940 a.m. on Wednesday.