Polyhedral NiO-Co3O4 materials, as a novel type of metal organic frameworks (MOFs), are considered to be attractive emerging materials in the fields of optoelectronics, energy storage systems, sensing and catalysis because of their high specific surface area, rich variable metal sites and unique morphology. Ultrafast pulse has become an important research tool in basic research and industrial application fields, including supercontinuum generation, laser material processing, laser surgery, lidar and terahertz generation. The saturable absorber (SA) is a key component that affects the laser parameters and generates ultrafast pulses, so it has caused an upsurge in the research of SA. Although MOFs and their derivatives have attracted the attention of researchers in many fields, few works have been carried out in ultrafast photonics. Here, we use the cobalt-based zeolite imidazole framework (ZIF-67-Co) as a precursor to synthesize NiO-Co3O4 polyhedron by calcination, and utilize it as an effective SA in a compact erbium-doped fiber laser (EDFL). The NiO-Co3O4 SA was measured based on home-made double-arm measurement system, which showed that its modulation depth was 5.6%. It shows that high-quality Q-switched mode-locking (QML) with a repetition rate of 5.2 MHz and a pulse width of 1.41 ps can be obtained when the pump power reaches 251.1 mW. After further improvement of the EDFL, we obtained a stable continuous wave mode-locked (CWML) pulse with a pulse duration of 1.35 ps. This is the first demonstration of a versatile pulse fiber laser based on a NiO-Co3O4 polyhedral SA. This work shows that the novel NiO-Co3O4 polyhedron is expected to serve as a highly potential nonlinear optical element in the fields of ultrafast photonics, light modulators and photodetectors.