To suppress fluctuation of air-fuel ratio due to influence of purge gas remaining in an intake passage after stop of purge.
An air-fuel ratio control device executes feedback control to make air-fuel ratio A/F coincide with stoichiometric air-fuel ratio stoich based on feedback correction value DFi calculated based on output of an air-fuel ratio sensor provided in an exhaust gas passage. The feedback correction value DFi is changed to a reference value 0 in a stepped manner at time t2 when time L during which intake air passage purge gas is consumed passes from purge stop t1. Namely, feedback correction value DFi is returned to the reference value 0 under a condition where air-fuel ratio is not influenced by intake air passage remaining purge gas. Consequently, roughening of air-fuel ratio due to influence of the intake air passage remaining purge gas after purge stop can be inhibited better than a case that the feedback correction value DFi is changed to 0 simultaneously with purge stop.