Electron beam induced-deposition (EBID) is a promising technique for fabricating nanometer-sized structures in a position- and size-controlled manner. The resolution of EBID is now reaching down to subnanometers. However, the deposits obtained by EBID contain a large amount of carbon. Thus, carbon reduction techniques are needed. In this study, nanostructures, such as nanowires, were fabricated by EBID using an iron pentacarbonyl precursor. Several techniques to reduce carbon were applied, including post-deposition heat-treatments and the modification of precursor. It was found that the post-deposition heat-treatment in air resulted in a formation of Fe2O3, and that carbon-free Fe3O4 was formed by mixing a small amount of water vapor in the iron pentacarbonyl precursor.