A novel passively Q-switched all-fiber laser using a single mode-multimode-single mode fiber device as the saturable absorber based on the Kerr effect of multimode interference is reported. Stable Q-switched operation of an Er(3+)/Yb(3+) co-doped fiber laser at 1559.5 nm was obtained at a pump power range of 190-510 mW with the repetition rate varying from 14.1 kHz to 35.2 kHz and the pulse duration ranging from 5.69 μs to 3.86 μs. A maximum pulse energy of 0.8 μJ at an average output power of 27.6 mW was achieved. This demonstrates a new modulation mechanism for realizing Q-switched all-fiber laser sources.