The present invention discloses a switching power supply control chip and a flyback AC-DC converter. The switching power supply control chip comprises a sampling unit, a slope compensation unit, a PWM comparator unit, a line voltage compensation control module, a line voltage compensation unit, a cycle-by-cycle current-limiting protection unit, an or gate, an RS trigger, an oscillator and a driving unit. The switching power supply control chip provided by the present invention detects the conduction time of an external power MOS transistor by the line voltage compensation control module, when the conduction time is greater than the first preset time, within the conduction time of the next external power MOS transistor, controls the line voltage compensation unit not to carry out the line voltage compensation on a reference voltage within the second preset time, thereby preventing the situation that an output overcurrent point and a recovery point under a low voltage are not increased along with the increase of the line voltage, enabling the conduction time of the external power MOS transistors to be longer in each cycle, and improving the output power.