The shelling caused a fire at the shelter in Fornaj district, located near a frontline and home to people forced from their homes after earlier bouts of fighting, said Usama Ali, spokesman for Tripoli's emergency and ambulance service.
Ali said the emergency services were attempting to evacuate the shelter of the remaining displaced people and relocate them elsewhere in the city, Ali said. People in the Fornaj shelter were mostly from the nearby Ain Zara district.
The eastern-based Libyan National Army (LNA) launched an offensive 13 months ago to capture Tripoli, seat of the Government of National Accord (GNA), which is recognized by the United Nations.
The United Nations said last month that four fifths of civilian casualties in Libya's civil war during the first three months of 2020 were attributable to the LNA, which is backed by the United Arab Emirates, Egypt and Russia.
The GNA has this year put the LNA onto the back foot with new help from Turkey, pushing it out of a string of towns west of Tripoli and putting it under pressure in its northwestern strongholds of Tarhouna and al-Watiya airbase.
Turkish support for the GNA has been most effective through its deployment of anti-aircraft defenses, and with its drones that have hammered LNA efforts to resupply the northwest battlefronts from the east.
On Saturday, the LNA said it had destroyed a Turkish drone at al-Watiya. The GNA said it had destroyed a Russian-supplied anti-aircraft system at the same location, though an LNA spokesman denied that.
The fighting in and around Tripoli has added to terrible conditions for residents, who this week faced long power and water cuts during a fierce spike in temperatures.