The “large-scale” operation was uncovered at a site describing itself as a gearbox repair business on an industrial estate in Hailsham, East Sussex.
Police arrested three men found leaving the building and had to use a Taser on one of them, the National Crime Agency said.
More than 30 handguns and a quantity of ammunition were found at the site, which has been cordoned off while investigations continue.
Image: The illegal gun factory was discovered in East Sussex
Greg Akehurst, 29, of no fixed address, and Mark Kinman, 63, of Bramwell Mews, Hailsham, were both charged with possessing a firearm.
Kyle Wood, 30, of Gratwicke Drive, Littlehampton, was charged with the same offence, as well as possessing ammunition.
The three men were remanded in custody and will appear at Kingston Crown Court on 17 September.
Image: Thirty firearms and some ammunition were found at the site
Rob Hickinbottom, head of the NCA firearms threat centre, said the firearms were at various stages of production and that searches have been carried out at other addresses, but would not say where.
Police do not know how long the firearms have been being produced for or how much they were sold for.
Mr Hickinbottom added he was “sure” the discovery would shock Hailsham residents but sought to reassure the public.
“We have prevented a potentially large quantity of weapons getting into the hands of criminals and used in violence on our streets,” he said.