The lines were closed at around 3pm on Tuesday, however, they re-opened around an hour later.
A spokesperson for the British Transport Police said: “British Transport Police were called to the line near Edinburgh Waverley station at 2.43pm today (26 July) following concerns for the welfare of a woman.
Officers attended, and the woman was taken to a place of safety.”
Scotrail informed customers of the incident on Twitter, writing: “Due to trespassers on the railway at Haymarket all lines are closed.
"Train services running through this station may be cancelled, delayed or revised.”