"Mitiga international airport was targeted," said Libyan Airlines spokesman Mohamad Ghnewa.
"Flights have been temporarily suspended because of this incident," he added, without detailing the origin of the rocket fire.
Libyan Airlines diverted a Tripoli-bound flight from Istanbul to Misrata airport, Ghnewa said, some 200 kilometres (120 miles) to the east.
According to a the authorities at Mitiga, diverted flights will soon be abe able to resume landing at the airport.
Air traffic at Mitiga had already been suspended several times in recent months, as forces loyal to the Tripoli-based government battle against fighters backing eastern commander Khalifa Haftar who launched an offensive on the capital in early April.
The airport was hit by an air strike on April 8, initially suspending air traffic before flights resumed on a nighttime schedule only until April 22.
Mitiga sits on a former military base on the city's outskirts and was opened to civilian air traffic after Tripoli's international airport was severely damaged in fighting during 2014.
Only Libyan Airlines flies within the country, operating internal flights and regular connections to foreign destinations including Tunisia and Turkey.