A free port is not outside the jurisdiction of New York state or the federal government when it comes to prosecuting crimes committed in the port. Matt says that activities like smuggling and gambling would be legal there; free ports are exempt from certain customs laws, import taxes and tariffs, but they are far from the lawless zones that they are made out to be. The tax exempt status and reduced customs inspections make certain crimes like smuggling easier to get away with, but they are by no means legal in a free port, and both the state and federal government have full jurisdiction to prosecute them.
While the mayor of New York City can declare a state of emergency, the mayor does not have the authority to declare martial law. Only the President of the United States and the Governor of New York have the authority to declare martial law in New York City.