The lawsuit says the bill violates the rights of young women as they are less likely to be violent.
Governor Rick Scott, a staunch ally of the gun lobby, enacted the bill, which the NRA says violates the constitution.
The law raises the legal age for buying rifles in Florida, but also allows the training and arming of school staff.
It does not ban semi-automatic rifles like the one used in the 14 February massacre in Parkland.
But it does introduce a three-day waiting period on all gun sales and a ban on bump stocks, a device that enables semi-automatic rifles to fire hundreds of rounds a minute.