A construction machine comprising: a track structure; a swing structure swingably attached onto the track structure; a work device attached to the swing structure; a hydraulic operating fluid tank; a hydraulic pump that delivers hydraulic operating fluid sucked from the hydraulic operating fluid tank; a swing motor that is supplied with the hydraulic operating fluid from the hydraulic pump and drives the swing structure; and an operation device for giving an instruction for operation of the swing structure, wherein the construction machine comprises a rotational speed sensor that detects a rotational speed of the swing motor, a pressure sensor (22a, 22b) that detects a driving pressure of the swing motor, a pressure adjusting device (10a, 12) capable of adjusting the driving pressure of the swing motor, and a controller that controls the pressure adjusting device, and the controller is configured to calculate a target rotational speed of the swing motor based on input from the operation device, calculate a degree of deviation of the rotational speed detected by the rotational speed sensor from the target rotational speed, set a target driving pressure of the swing motor according to a swing moment as a moment of inertia about a swing axis of the swing structure and the work device and control the pressure adjusting device in such a manner as to reduce a difference between the driving pressure detected by the pressure sensor and the target driving pressure, when the degree of deviation is larger than a predetermined value, and control the pressure adjusting device in such a manner as to reduce a difference between the rotational speed detected by the rotational speed sensor and the target rotational speed, when the degree of deviation is equal to or smaller than the predetermined value. a track structure; a swing structure swingably attached onto the track structure; a work device attached to the swing structure; a hydraulic operating fluid tank; a hydraulic pump that delivers hydraulic operating fluid sucked from the hydraulic operating fluid tank; a swing motor that is supplied with the hydraulic operating fluid from the hydraulic pump and drives the swing structure; and an operation device for giving an instruction for operation of the swing structure, wherein the construction machine comprises a rotational speed sensor that detects a rotational speed of the swing motor, a pressure sensor (22a, 22b) that detects a driving pressure of the swing motor, a pressure adjusting device (10a, 12) capable of adjusting the driving pressure of the swing motor, and a controller that controls the pressure adjusting device, and a rotational speed sensor that detects a rotational speed of the swing motor, a pressure sensor (22a, 22b) that detects a driving pressure of the swing motor, a pressure adjusting device (10a, 12) capable of adjusting the driving pressure of the swing motor, and a controller that controls the pressure adjusting device, and the controller is configured to calculate a target rotational speed of the swing motor based on input from the operation device, calculate a degree of deviation of the rotational speed detected by the rotational speed sensor from the target rotational speed, set a target driving pressure of the swing motor according to a swing moment as a moment of inertia about a swing axis of the swing structure and the work device and control the pressure adjusting device in such a manner as to reduce a difference between the driving pressure detected by the pressure sensor and the target driving pressure, when the degree of deviation is larger than a predetermined value, and control the pressure adjusting device in such a manner as to reduce a difference between the rotational speed detected by the rotational speed sensor and the target rotational speed, when the degree of deviation is equal to or smaller than the predetermined value. calculate a target rotational speed of the swing motor based on input from the operation device, calculate a degree of deviation of the rotational speed detected by the rotational speed sensor from the target rotational speed, set a target driving pressure of the swing motor according to a swing moment as a moment of inertia about a swing axis of the swing structure and the work device and control the pressure adjusting device in such a manner as to reduce a difference between the driving pressure detected by the pressure sensor and the target driving pressure, when the degree of deviation is larger than a predetermined value, and control the pressure adjusting device in such a manner as to reduce a difference between the rotational speed detected by the rotational speed sensor and the target rotational speed, when the degree of deviation is equal to or smaller than the predetermined value.