A control system for an internal combustion engine including a high pressure fuel pump in which a volume of a fuel chamber is increased and is decreased and a fuel is pressurized by a reciprocating motion of a plunger due to an action of a pump cam that rotates in conjunction with a rotation of a crankshaft, and an in-cylinder fuel injection valve which injects the fuel into a cylinder, the control system comprising a controller configured to calculate a crank counter that is counted up at every fixed crank angle when the crankshaft is rotating in a forward rotation direction, estimate a swing-back amount indicating a turning amount of the crankshaft in a reverse rotation direction until the crankshaft stops, calculate a stop-time counter value which is a value of the crank counter at the time when the internal combustion engine is stopped based on a final counter value which is the value of the crank counter calculated last before the crankshaft stops and the estimated swing-back amount, store a map in which a top dead center of the plunger is associated with the value of the crank counter, calculate the number of driving times of the high pressure fuel pump with reference to the map based on the calculated stop-time counter value and the value of the crank counter, calculate the number of driving times of the high pressure fuel pump by increasing the number of driving times by one each time a high pressure system fuel pressure which is a pressure of the fuel supplied to the in-cylinder fuel injection valve increases by a threshold or more, and correct the swing-back amount used for calculating the stop-time counter value based on a difference between the number of driving times calculated based on the calculated stop-time counter value and the value of the crank counter and the number of driving times calculated by increasing the number of driving times by one each time the high pressure system fuel pressure increases by the threshold or more. calculate a crank counter that is counted up at every fixed crank angle when the crankshaft is rotating in a forward rotation direction, estimate a swing-back amount indicating a turning amount of the crankshaft in a reverse rotation direction until the crankshaft stops, calculate a stop-time counter value which is a value of the crank counter at the time when the internal combustion engine is stopped based on a final counter value which is the value of the crank counter calculated last before the crankshaft stops and the estimated swing-back amount, store a map in which a top dead center of the plunger is associated with the value of the crank counter, calculate the number of driving times of the high pressure fuel pump with reference to the map based on the calculated stop-time counter value and the value of the crank counter, calculate the number of driving times of the high pressure fuel pump by increasing the number of driving times by one each time a high pressure system fuel pressure which is a pressure of the fuel supplied to the in-cylinder fuel injection valve increases by a threshold or more, and correct the swing-back amount used for calculating the stop-time counter value based on a difference between the number of driving times calculated based on the calculated stop-time counter value and the value of the crank counter and the number of driving times calculated by increasing the number of driving times by one each time the high pressure system fuel pressure increases by the threshold or more.