The gunmen have taken hostages whose nationalities have not been confirmed, police officials said, following a firefight which saw at least three guards killed.
The incident at the seaside Corinthia Hotel in Tripoli began with a massive explosion which officials said was caused by a car bomb in the parking lot outside.
Essam Al-Naas, a spokesman for a Tripoli security agency, said police were engaged in an ongoing standoff with an estimated five gunmen.
An employee of the hotel, Hassan al-Abey, said masked attackers entered the building shooting in the air. He said an evacuation had been ordered before the attack, and that he was among those evacuated.
Tripoli, Libya’s capital, has been subject to repeated car bombings and shootings in the years since a civil war saw dictator Colonel Muammar Gaddafi ousted and ultimately killed in 2011.