The development of multifunctional electrocatalysts with rich resources, excellent performance, and stability is necessary for water splitting to achieve sustainable hydrogen and oxygen production. Herein, we report the preparation of a bifunctional coral-like nanostructured electrocatalyst (p-MoS2/NiS2) by in situ vulcanization of polymeric sulfur with a MoO3/Ni as the precursor. It is exciting that the whole preparation process of the electrocatalyst can be completed in a few hours. The as-fabricated multimetallic sulfide not only exhibits well-defined heterointerfaces and the defect-rich two-dimensional (2D) nanoconfiguration with high conductivity to overcome the poor hydrogen evolution reaction (HER) activity, but also promotes the formation of the 1T phase. The obtained p-MoS2/NiS2 nanostructures exhibit low overpotentials of −115 mV at −10 mA cm–2 and 337 mV at 100 mA cm–2 toward the HER and oxygen evolution reaction (OER), respectively, which surpass most of the previously reported bimetallic sulfide-based electrocatalysts. Benefiting from the stability of the hierarchical heterostructure and the coupling effect between the inner layer of NiS2 and outer layers of MoS2, the p-MoS2/NiS2 catalyst is endowed with high activity for water splitting. It can be used as a bifunctional electrocatalyst for water splitting with a cell voltage of 1.51 V at a current density of 10 mA cm–2. Overall, this work proposes a simple in situ vulcanization method to synthesize MoS2, which expands the interlayer spacing and realizes the coexistence of a metastable structure and metal doping.