Polyacrylonitrile (PAN) nanofibers are one of the primary precursors in the production of carbon nanofibers. The nanofiber morphology is significantly affected by the process parameters such as polymer concentration, distance, applied voltage and feed rate during the production of PAN nanofibers obtained by the solution-based electrospinning method, and these parameters should be optimized properly. In this study, firstly PAN nanofiber production parameters were optimized, and then homogeneous and thin PAN nanofibers produced in optimum conditions were used as the precursor in the production of carbon nanofibers. PAN nanofibers with a diameter of 233 nm were obtained at 7.5% PAN concentration in N,N-dimethylformamide (DMF), 28 kV applied voltage, 17.5 cm nozzle to collector distance, 2 ml/h feed rate and 500 rpm rotation speed of the aluminum drum. The carbon nanofiber diameters produced after the stabilization and carbonization processes were measured as 200 and 140 nm, respectively. The morphological, chemical and thermal properties of the produced nanofibers were characterized by field emission scanning electron microscopy (FE-SEM), Fourier transform infrared (FT-IR), thermogravimetric analyzer (TGA). Carbon nanofibers, which are made from optimized electrospun PAN nanofibers, can be used to construct supercapacitors in future studies.