This study aims to investigate the flash sintering mechanisms of magnesium diborides using SPS and optimize the sintering process conditions. Three different precursor materials were used: i) commercial powder MgB2, ii) mixtures of magnesium and nano boron powder (Mg + 2B), and iii) mixtures of Mg and MgB4 powder for an "in-situ" reactive synthesis. The density of the obtained bulks exceeds 90 % of the theoretical density of the material. The structure and microstructure of the samples were analyzed using X-ray diffraction and SEM, which were correlated with their superconducting properties. The critical current density (Jc), pinning force (fp), and electrical resistivity (ρ) of the samples were also investigated. The results show that the in-situ reactive synthesis of MgB2 using magnesium and nano boron powder was the most effective method for producing high-quality samples with improved superconducting properties. The findings could lead to the development of more efficient methods for producing high-performance of MgB2 bulks.