Staff at McDonald Road Library have found used needles in the toilets.
The McDonald Road Library, which has 15,000 visitors a month and holds reading events for young children, is thought to have attracted drug users from nearby hostels because of the cold weather.
Staff have discovered needles left lying in the library toilet in recent weeks, and the council's community safety wardens are now set to visit the facility to help tackle the problem.
A library source said: "There are halfway houses for prisoners just out of jail, as well as a number of hostels near the library. With the cold weather, they have been going there in the morning after being kicked out of their accommodation for the day. The staff are worried that people are now shooting up in the toilets after finding these needles."
Councillor Angela Blacklock, whose Leith Walk ward includes the library, said: "I am shocked by this, but in a way I'm also not surprised. I hold my surgeries in the library every week and there are a lot of homeless people who seem to sit in there.
"I take my children to those surgeries and they use that toilet. Many other local children come to the library for the books or to use a computer and I'm sure they use that toilet as well. It's really concerning that needles are being found in there.
"There are new guidelines which have been approved by the council allowing library staff to remove people they think are not in the library to use it facilities. We'll have to see how the staff can manage to use these powers."
The toilets in the library are located on the first floor of the building and out of sight from staff in the ground-floor reading room.
A city council spokeswoman said: "Edinburgh libraries are public buildings and we work hard to make sure they are safe, pleasant and welcoming for everyone who visits them.
"Library visitors are requested to abide by the service's management rules, which include, for example, behaving courteously to staff and fellow visitors, refraining from dropping litter and taking care not to damage library property.
"The code also states people should not enter city libraries while under the influence of alcohol or drugs. Where there are breaches of these management rules, our libraries staff will work with the individuals concerned to resolve them. In certain cases, there might also be a need to liaise with partner agencies to tackle with any potential issues."