Migrants on board said the adult men were packed inside the hold and killed by motor fumes, the Ansa news agency reported.
Port officials said the cause of death was not immediately clear and medical tests were being conducted.
The boat, carrying mainly migrants from sub-Saharan Africa, left Libya three days ago, a port official said.
Thousands of people fleeing turmoil in North Africa have sailed to Italy in rickety boats in recent months.
The United Nations refugee agency has said one in 10 migrants fleeing conflict in Libya by sea is likely to drown or die from hunger or exhaustion in appalling conditions during the crossing.Reuters