A construction machine according to the present invention includes a variable displacement hydraulic pump (11, 12) driven by a prime mover (10), a single traveling actuator (5) driven with pressure oil discharged from the hydraulic pump (11), a plurality of work actuators (2a, 4d to 4f) driven with the pressure oil discharged from the hydraulic pump (11, 12), a plurality of control valves (13 to 17) that control flows of the pressure oil from the hydraulic pump (11) to each of the traveling actuator (5) and the plurality of work actuators (2a, 4d to 4f), a detection means (24) for detecting a drive command for the traveling actuator (5), and a flow rate control means (11a, 30, 40, 43) for increasing a maximum flow rate of the hydraulic pump (11) when the drive command for the traveling actuator (5) is detected with the detection means (24).