Recently, iron sulfide nanomaterials have drawn increased interest, due to their novel properties and extensive applications depending on their structure. To date, various methods have been employed for the synthesis of iron sulfide nanostructures with different shapes and morphologies. The synthesis method of iron sulfide nanomaterial is a challenge, as a small variation in sulfur content can lead to formation of different phases of iron sulfide. In this study, iron sulfide nanostructures were synthesized using our fast, simple, efficient, economical and environmentally friendly method in an electrochemical cell containing two iron sheets as electrodes in an aqueous solution of sodium sulfide. This method, with many advantages such as low-toxicity, low cost and easy handling, helps to control the properties of the products through the synthesis by tuning the growth conditions. Here, the influence of applied voltage ranging from 5 V to 25 V and annealing temperatures of 200 °C and 800 °C on the structure and magnetic properties of the products were studied. The samples were analyzed by X-ray diffraction (XRD), fourier transform infrared spectroscopy (FT-IR), scanning electron microscopy (SEM) and vibrating sample magnetometer (VSM). XRD patterns confirmed the formation of monoclinic and hexagonal pyrrhotite at 200 °C and 800 °C, respectively. Based on SEM images, pyrrhotite in different shapes, such as quasi-spherical, feathers, sheets and flower-like structures, are formed depending on the applied voltage and annealing temperature. According to VSM results, all samples annealed at 200 °C are magnetically soft with only a little hysteresis, but the magnetization increases from 2.3 emu/g to 10.1 emu/g when applied voltage varies from 5 V to 25 V. All samples annealed at 800 °C exhibit an antiferromagnetic behavior. With increasing the applied voltage, the value of remanence magnetization and coercivity increases up to ∼2000 Oe and ∼0.14 emu/g, respectively.