The Neimoidian droid factory was a droid factory built on the planet Mustafar by the Confederacy of Independent Systems during the Clone Wars.
During the Clone Wars, a group of Neimoidian separatists discovered the wreckage of an ancient Old Republic cruiser on Mustafar. The only occupant of the ship was the assassin droid HK-47. The Neimoidian engineers who examined the droid soon realized that HK-47's technology was superior than anything they knew. Since they were unable to perform a memory wipe, they transferred the memory and thought patterns of the droid into a sub-system of the crashed cruiser in order to study the technology of the droid. Trade Federation Viceroy Nute Gunray then ordered the construction of a droid factory on Mustafar in order to produce an army of battle droids based on HK-47's technology. The new droid model developed by the Separatists included new HK-series droids, such as the HK-57 and HK-67, and the larger Union Sentry Droids.
Unfortunately for the Separatists, the construction of a droid factory was only achieved in the last days of the Clone Wars. Viceroy Gunray and the Separatist Council were killed just before the factory was activated. As the Clone Wars ended, the Neimoidian separatists fled Mustafar to avoid the retaliation of the Galactic Empire and abandoned the facility. Only a small detachment of defense droids remained in the factory. After the Clone Wars, the Mustafarians indeed tried to explore the factory but they soon gave up because no one who had entered the factory had ever come back.
In 1 ABY, during the Galactic Civil War, a group of spacers working for the Mensix Mining Company explored the crashed Old Republic cruiser and conversed with HK-47, still trapped in a computer of the destroyed ship. HK-47 tricked the spacers into helping him to escape the ship's computer. The droid claimed that he could help the Mensix Company if they transferred his memory to the computers of the droid factory. The spacers accepted and headed to the factory. There, they battled the old Separatists droids that defended the facility — B1 battle droids, B2 super battle droids, blastromech droids, and CWW8 combat droids — in order to access the central computer. The spacers finally reactivated the facility to allow HK-47 to transfer his AI to the factory.
HK-47 immediately revealed his true nature and soon began to use the factory to produce a large droid army to destroy all organics on the planet. HK-47's droid army, mostly composed of HK-77 droids, later attacked the Koseyet Mining Camp. Although the camp was poorly defended, the droid army was defeated thanks to the intervention of a large groups of spacers hired by Milo Mensix. As soon as the battle was concluded, the spacers assaulted the droid factory to stop the production of droids. Once again, they had to fight numerous battle droids, including HK-58 Aurek, HK-58 Besh. Eventually, the spacers destroyed the Doom Bringer and shut down the facility. Yet, the deactivation of the droid factory did not affected HK-47 himself who had transferred his AI from the factory to his original body. HK-47 and the remnants of his army were later defeated in an epic battle in a volcano crater.
After the conclusion of HK-47's droid revolution, Mensix Corp took control of the droid factory; with the intention of selling it to the Empire.
The Neimoidian droid factory appeared in the 2003 video game Star Wars Galaxies, a massively multiplayer online roleplaying game developed by Sony Online Entertainment and published by LucasArts, prior to its closure on December 15, 2011. The droid factory was added to the game with the release of the expansion pack Trials of Obi-Wan on November 1, 2005.