1. An air-fuel ratio control apparatus for an internal combustion engine including a variable lift mechanism that changes a lift amount of an intake valve, comprising: a first control unit that performs an air-fuel ratio control to correct a fuel injection amount command value using a correction amount that is set based on a value output from a sensor provided downstream of an exhaust gas purification catalyst in an exhaust passage of the internal combustion engine, which outputs a signal indicating an oxygen concentration in exhaust gas downstream of the exhaust gas purification catalyst; and a second control unit that learns a relationship between a deviation of the correction amount from a reference value and the lift amount, that calculates a learned deviation value based on the lift amount, using the learned relationship, and that corrects the fuel injection amount command value using the correction amount including the calculated learned deviation value, wherein the learned deviation value, calculated by using the learned relationship from the second control unit, increases as the lift amount decreases.