We propose and demonstrate the operation of Q-switched mode-locked square-wave pulses in a thulium-holmium co-doped fiber laser. By using a nonlinear amplifying loop mirror, continuous square-wave dissipative soliton resonance pulse is obtained with 4.4 MHz repetition rate. With the increasing pump power, square-wave pulse duration can be broadened from 1.7 ns to 3.2 ns. On such basis Q-switched mode-locked operation is achieved by properly setting the pump power and the polarization controllers. The internal mode-locked pulses in Q-switched envelope still keep square-wave type. The Q-switched repetition rate can be varied from 41.6 kHz to 74 kHz by increasing pump power. The corresponding average single-pulse energy increases from 2.67 nJ to 5.2 nJ. The average peak power is also improved from 0.6 W to 1.1 W when continuous square-wave operation is changed into Q-switched mode-locked operation. It indicates that Q-switched mode-locked operation is an effective method to increase the square-wave pulse energy and peak power.