A device for controlling an engine including a plurality of cylinders (#1, #2, #3, #4) and switching between all-cylinder operation, in which all the cylinders (#1, #2, #3, #4) are operated, and deactivated cylinder operation, in which some of the cylinders are deactivated, the device comprising: a valve stopping mechanism (45d, 46d) configured to actuate to switch the engine from the all-cylinder operation to the deactivated cylinder operation when oil pressurized up to a predetermined transient oil pressure is supplied; an oil supply device (81, 84) configured to discharge oil to a hydraulic passage connected to the valve stopping mechanism (45d, 46d) and to adjust an oil pressure of the oil; a control valve (97, 98) configured to supply oil from the hydraulic passage to the valve stopping mechanism (45d, 46d); a filling amount adjusting device (17, 18, 204) configured to adjust an intake filling amount indicating an amount of gas to be supplied to each of the cylinders (#1, #2, #3, #4); and a controller connected to the oil supply device (81, 84), the control valve (97, 98), and the filling amount adjusting device (17, 18, 204) and configured to output a control signal to each of the oil supply device (81, 84), the control valve (97, 98), and the filling amount adjusting device (17, 18, 204) to operate the engine, wherein an oil pressure sensor connected to the controller, and configured to detect an oil pressure of oil flowing through the hydraulic passage and to output a signal indicating a detection result to the controller, the controller outputting a control signal to the oil supply device (81, 84) to increase the oil pressure detected by the oil pressure sensor up to the transient oil pressure and then outputting a control signal to the control valve (97, 98) to supply the oil adjusted to be the transient oil pressure to the valve stopping mechanism (45d, 46d) to actuate the valve stopping mechanism (45d, 46d), and the controller, after outputting the control signal to the oil supply device (81, 84), outputting a control signal to the filling amount adjusting device (17, 18, 204) to increase the intake filling amount compared with that at a start time of raising the oil pressure up to the transient oil pressure that is an oil pressure set to a pressure higher than a maintaining oil pressure required for maintenance of the deactivated cylinder operation, and if the increase in the intake filling amount is completed, supplying oil pressurized up to the transient oil pressure to the valve stopping mechanism (45d, 46d). a valve stopping mechanism (45d, 46d) configured to actuate to switch the engine from the all-cylinder operation to the deactivated cylinder operation when oil pressurized up to a predetermined transient oil pressure is supplied; an oil supply device (81, 84) configured to discharge oil to a hydraulic passage connected to the valve stopping mechanism (45d, 46d) and to adjust an oil pressure of the oil; a control valve (97, 98) configured to supply oil from the hydraulic passage to the valve stopping mechanism (45d, 46d); a filling amount adjusting device (17, 18, 204) configured to adjust an intake filling amount indicating an amount of gas to be supplied to each of the cylinders (#1, #2, #3, #4); and a controller connected to the oil supply device (81, 84), the control valve (97, 98), and the filling amount adjusting device (17, 18, 204) and configured to output a control signal to each of the oil supply device (81, 84), the control valve (97, 98), and the filling amount adjusting device (17, 18, 204) to operate the engine, wherein an oil pressure sensor connected to the controller, and configured to detect an oil pressure of oil flowing through the hydraulic passage and to output a signal indicating a detection result to the controller, the controller outputting a control signal to the oil supply device (81, 84) to increase the oil pressure detected by the oil pressure sensor up to the transient oil pressure and then outputting a control signal to the control valve (97, 98) to supply the oil adjusted to be the transient oil pressure to the valve stopping mechanism (45d, 46d) to actuate the valve stopping mechanism (45d, 46d), and the controller, after outputting the control signal to the oil supply device (81, 84), outputting a control signal to the filling amount adjusting device (17, 18, 204) to increase the intake filling amount compared with that at a start time of raising the oil pressure up to the transient oil pressure that is an oil pressure set to a pressure higher than a maintaining oil pressure required for maintenance of the deactivated cylinder operation, and if the increase in the intake filling amount is completed, supplying oil pressurized up to the transient oil pressure to the valve stopping mechanism (45d, 46d).