A control device for an internal combustion engine including an engine body, a fuel injection valve configured to inject fuel into a combustion chamber of the engine body, and a vibration sensor configured to detect vibration of the engine body, the control device comprising an electronic control unit configured to: set a target injection amount and a target injection timing based on an engine operation state; control an injection amount and an injection timing of fuel to be injected from the fuel injection valve to the target injection amount and the target injection timing, respectively; detect an ignition timing of fuel based on a vibration component of the engine body in a specific frequency bandwidth, the specific frequency bandwidth being a bandwidth on a low frequency side of a frequency bandwidth where the engine body undergoes elastic vibration, and the specific frequency bandwidth being a bandwidth where a ratio of a combustion vibration component that is generated when the engine body is subjected to combustion pressure to vibration components detected by the vibration sensor becomes equal to or greater than a predetermined value; and correct at least one of the target injection amount and the target injection timing based on a deviation between the detected ignition timing and a target ignition timing according to the engine operation state, wherein the electronic control unit is configured to calculate a vibration level of the engine body based on the vibration component of the engine body in the specific frequency bandwidth; the electronic control unit is configured to calculate a mechanical vibration level of the engine body based on the engine operation state; the electronic control unit is configured to subtract the mechanical vibration level from the vibration level to calculate a combustion vibration level; and the electronic control unit is configured to detect, as an ignition timing of fuel, a timing at which the combustion vibration level becomes equal to or greater than a predetermined combustion determination threshold. set a target injection amount and a target injection timing based on an engine operation state; control an injection amount and an injection timing of fuel to be injected from the fuel injection valve to the target injection amount and the target injection timing, respectively; detect an ignition timing of fuel based on a vibration component of the engine body in a specific frequency bandwidth, the specific frequency bandwidth being a bandwidth on a low frequency side of a frequency bandwidth where the engine body undergoes elastic vibration, and the specific frequency bandwidth being a bandwidth where a ratio of a combustion vibration component that is generated when the engine body is subjected to combustion pressure to vibration components detected by the vibration sensor becomes equal to or greater than a predetermined value; and correct at least one of the target injection amount and the target injection timing based on a deviation between the detected ignition timing and a target ignition timing according to the engine operation state, the electronic control unit is configured to calculate a vibration level of the engine body based on the vibration component of the engine body in the specific frequency bandwidth; the electronic control unit is configured to calculate a mechanical vibration level of the engine body based on the engine operation state; the electronic control unit is configured to subtract the mechanical vibration level from the vibration level to calculate a combustion vibration level; and the electronic control unit is configured to detect, as an ignition timing of fuel, a timing at which the combustion vibration level becomes equal to or greater than a predetermined combustion determination threshold.