Leader of Harrogate Borough Council, Coun Richard Cooper, called on Network Rail to tidy up the embankments in April, describing the state of them as 'shameful'.
Investigating the situation after concerns were raised by town residents, Coun Cooper photographed litter, abandoned clothes and even a dumped mattress along the embankment.
Coun Cooper said: "Currently this is the first impression of Harrogate that many visitors have.
"We want to attract more people to come to Harrogate and support our local economy. Through keeping their embankments free of rubbish Network Rail have a role in helping us do just that."
But after doing its own assessment of the problem, Network Rail has now agreed to organise a clean-up of the worst affected areas.
A Network Rail spokesperson said: “We are aware of issues with fly-tipping near the railway in Harrogate. Not only is fly-tipping illegal, it’s also incredibly dangerous, particularly if those doing so are trespassing on the tracks, and we work closely with British Transport Police to tackle this.
“We have previously carried out work to clear rubbish which has been dumped on the railway in Harrogate.
"Network Rail’s maintenance teams recently visited the site to assess the extent of the problem and have organised for a clean-up of the worst affected areas which will take place in due course.
“We’d like to thank Andrew Jones MP, Councillor Richard Cooper and members of the public for bringing this to our attention.”
To share your concerns about fly-tipping on rail embankments call Network Rail's National Helpline on 03457 11 41 41