The blaze broke out where an aid agency had been storing food and cooking oil.
Firefighters and military officials spent hours battling the fire, using helicopters to drop water on it, before getting it under control on Thursday.
No injuries were reported and the cause of the fire is not yet known.
Footage shared on social media showed port workers running away as the fire broke out at the duty-free zone in the port on Thursday. The blaze sent a plume of dark smoke over the Lebanese capital.