Developing cost-effective and remarkable electrocatalysts toward oxygen evolution reaction (OER) and hydrogen evolution reaction (HER) performs excelling role in boosting the hydrogen energy application. Herein, a novel in-situ one-pot strategy is developed for the first time to synthesize molybdenum carbide nanoparticles (Mo2C NPs) incorporated on nitrogen (N) and phosphorous (P) co-doped stereotaxically carbon (SC). The optimized Mo2C NPs/N, P–SC–800 electrocatalyst exhibits lower overpotentials of 131 and 287 mV for HER and OER to deliver a current density of 10 mA cm−2 in 1.0 M KOH medium with smaller Tafel slopes of 58.9 and 74.4 mV/dec, respectively. In addition, an electrolyzer using Mo2C NPs/N, P–SC–800 electrode as cathode and anode delivers a current density of 10 mA cm−2 at a small voltage of 1.64 V for overall water splitting. The excellent water splitting performance could be ascribed to optimum Mo2C NPs for more accessible active sites, highly active N, P-SC networks for accelerated electron transfers, and synergetic effect between Mo2C NPs and N, P-SC networks. The N, P-SC network not only enhances the overall dispersion of Mo2C NPs but also contributes numerous electroactive edges to enhance the performance of HER, OER, and overall water splitting activity. This research work explores the in-situ one-step strategies of advanced, cost-effective, and non-precious metal electrocatalysts for efficient water splitting and motivates the consideration of a novel class of heteroatom doped stereotaxically carbon nanocomposites for sustainable energy production.