Pulsed lasers operating in the mid-infrared are of great importance for numerous applications in spectroscopy, medical surgery, laser processing, and communications. In spite of recent advances with mid-infrared gain platforms, the lack of a capable pulse generation mechanism hinders the development of compact mid-infrared pulsed laser source. Here we show that MIL-68(Al) and MIL-68(Fe), which are aluminum- and iron- based metal-organic frameworks (MOFs) with ordered atoms distribution and periodic mesoporous structure, constitute exceptional optical switches for the mid-infrared. We fabricated the MIL-68(Al) and MIL-68(Fe) via hydrothermal method and prepared reflection-type MIL-68(Al)- and MIL-68(Fe)- saturable absorber mirrors (SAMs). By employing the as-prepared SAMs in the laser cavities, we achieved high-power nanosecond Q-switched fiber lasers at 2.8 µm. Especially, the average output power and pulse duration of the MIL-68(Al) Q-switched fiber laser reached 809.1 mW and 567 ns, respectively. To the best of our knowledge, this is the first time to demonstrate that MIL-68(M) can be efficient optical switches for 3-µm mid-IR laser pulses generation. Our findings reveal that MIL-68(M) is promising saturable absorber for compact and high-performance mid-infrared pulsed lasers.