The invention discloses an AOI visual inspection system and a detection method thereof. The system comprises a machine body and a control box, a moving mechanism is arranged at the lower end of the machine body, a display module is fixedly arranged at the front end of the machine body in an inlaid mode, an input module is fixedly installed at the front end of the machine body, and a protection mechanism is arranged at the front end of the machine body; a permanent magnet is fixedly installed at the front end of the machine body, a shielding mechanism is arranged at the front end of the machine body, a detection mechanism is arranged in the machine body, an inlet is formed in the front end of the machine body, and a placement plate is movably installed in the inlet. During detection, the shielding plate slides downwards along the sliding groove, so that the shielding plate covers and seals the inlet, interference of external light to a detection result is prevented, the first camera moves into the placement groove, the shielding plate is moved upwards to reset after detection is completed, and the shielding plate can be attracted and fixed to the lower end of the permanent magnet through magnetic force.