Due to their redox-rich chemistry and distinctive electrical properties, Co-based electrocatalysts for H2 and O2 evolution reactions (HER and OER) have garnered attention; however, in addition to their limited activity, the chemical processes used to prepare them are time-consuming, costly, and potentially hazardous. Herein, we report a facile, rapid, and repeatable approach to preparing CoSx and CoP materials by using a nanoflower-like Co(OH)2 precursor, which was grown in the liquid phase over Ni-foam under microwave impact. Further, the sulfurization of Co(OH)2 nano-flowers produced rod-like CoSx structures. Whereas, phosphorization of Co(OH)2 resulted in mesoporous nanosheet-like CoP architecture, which substantially exposed surface sites and fastened the charge as well as mass transfer, benefitting its electrocatalytic activity, as CoP catalysts displayed a lower HER and OER overpotential of 184 mV and 260 mV to carry 10 mA/cm2 current density than CoSx sample (233 mV and 284 mV), respectively. Moreover, CoP material is possessed to have a high specific capacitance of 4.87 F/cm2. Our cost-effective and scalable synthesis strategy solves the issues related to fabricating inexpensive, efficient, and high-quality transition metal-based materials for energy applications.