Zoe Ferguson, from Inverkeithing, had travelled from Inverkeithing Train Station to Edinburgh Waverley on Friday afternoon.
But police put out a missing persons appeal today after she had been missing for nearly three days.
CCTV images released by the force showed her about to board a train to Edinburgh and spending time in the city’s Waverley Mall.
However in a statement released this evening, police said: “We can confirm that 14-yr-old Zoe Ferguson, who has been reported missing since Friday 26th April, has been traced safe and well in the Dunfermline area.
“We would like to thank everyone who shared our appeals and contacted us with information which led directly to her being traced.”
Sign up to our newsletter: enter your email in the box at the top of this article to get daily updates straight to your inbox.