An all-fiber Yb-doped Q-switched fiber ring laser system is reported. The laser system uses an all-fiber M-Z interferometer which plays both roles of Qswitch and tunable filter. Theoretical analysis and primary experimental results are given. A continuous tuning range 6fover 7 nm (from 1035 nm to 1042 nm) and a very stable pulse train with repetition rates exceeding 3 kHz and pulse width of 1.1μs were obtained. The laser system shows low cavity loss and is stable.