A control device for a compression ignition engine configured to cause fuel injected into a combustion chamber from an injector to combust by compression ignition, comprising: an intake O 2 sensor configured to acquire an oxygen concentration of intake air supplied to the combustion chamber; and a processor configured to control an injection amount and an injection timing of the fuel by the injector, wherein the processor is configured to cause the injector to perform a pre-injection in which fuel is injected before a compression top dead center, and a main injection in which fuel is injected during combustion of the fuel injected by the pre-injection, wherein the processor is configured to set the fuel injection timings of the pre-inj ection and the main injection so that an interval between a first peak (HAp) of a heat release rate resulting from the combustion of the fuel injected by the pre-injection and a second peak (HBp) of the heat release rate resulting from the combustion of the fuel injected by the main injection becomes an interval to make pressure waves caused by the combustions of the fuel of the pre-injection and the main injection cancel each other out, and wherein when an increase of the oxygen concentration is detected by the intake O 2 sensor, the processor is configured to control the injector to reduce the injection amount of the pre-injection and retard the injection timing of the pre-injection compared with a case where the increase of the oxygen concentration is not detected, under a condition that an engine load and an engine speed are the same, and/or when a decrease of the oxygen concentration is detected by the intake O 2 sensor, the processor is configured to control the injector to increase the injection amount of the pre-injection and advance the injection timing of the pre-injection compared with a case where the decrease of the oxygen concentration is not detected, under a condition that an engine load and an engine speed are the same characterized in that when the increase of the oxygen concentration is detected, the processor is configured to estimate an advanced deviation that is an amount by which the occurring timing of the first peak (HAp) is advanced from a target timing due to the increase of the oxygen concentration, configured to set a decreasing amount (ΔQfa) of the injection amount of the pre-injection so that the occurring timing of the first peak (HAp) is retarded more than the estimated advanced deviation, configured to estimate a cutback deviation that is an amount by which a height of the first peak (HAp) is reduced from a target height due to the injection amount of the pre-injection being decreased by the set decreasing amount (ΔQfa), and configured to set a retarding amount (ΔTfa) of the injection timing of the pre-injection so that the height of the first peak (HAp) increases by an amount corresponding to the estimated cutback deviation. an intake O 2 sensor configured to acquire an oxygen concentration of intake air supplied to the combustion chamber; and a processor configured to control an injection amount and an injection timing of the fuel by the injector, wherein the processor is configured to cause the injector to perform a pre-injection in which fuel is injected before a compression top dead center, and a main injection in which fuel is injected during combustion of the fuel injected by the pre-injection, wherein the processor is configured to set the fuel injection timings of the pre-inj ection and the main injection so that an interval between a first peak (HAp) of a heat release rate resulting from the combustion of the fuel injected by the pre-injection and a second peak (HBp) of the heat release rate resulting from the combustion of the fuel injected by the main injection becomes an interval to make pressure waves caused by the combustions of the fuel of the pre-injection and the main injection cancel each other out, and wherein when an increase of the oxygen concentration is detected by the intake O 2 sensor, the processor is configured to control the injector to reduce the injection amount of the pre-injection and retard the injection timing of the pre-injection compared with a case where the increase of the oxygen concentration is not detected, under a condition that an engine load and an engine speed are the same, and/or when a decrease of the oxygen concentration is detected by the intake O 2 sensor, the processor is configured to control the injector to increase the injection amount of the pre-injection and advance the injection timing of the pre-injection compared with a case where the decrease of the oxygen concentration is not detected, under a condition that an engine load and an engine speed are the same characterized in that when the increase of the oxygen concentration is detected, the processor is configured to estimate an advanced deviation that is an amount by which the occurring timing of the first peak (HAp) is advanced from a target timing due to the increase of the oxygen concentration, configured to set a decreasing amount (ΔQfa) of the injection amount of the pre-injection so that the occurring timing of the first peak (HAp) is retarded more than the estimated advanced deviation, configured to estimate a cutback deviation that is an amount by which a height of the first peak (HAp) is reduced from a target height due to the injection amount of the pre-injection being decreased by the set decreasing amount (ΔQfa), and configured to set a retarding amount (ΔTfa) of the injection timing of the pre-injection so that the height of the first peak (HAp) increases by an amount corresponding to the estimated cutback deviation.