The invention relates to the technical field of automated optical inspection of LCD (liquid crystal display) modules, in particular to an automated optical inspection device for defect inspection of an LCD module and an automated optical inspection method for the defect inspection of the LCD module. The device comprises a central control processing unit, an image acquisition module, an image processing module and a PG (Pattern Generate) module. The method comprises the following steps of receiving a PG configuration parameter and a camera configuration parameter, lighting up modules according to the PG configuration parameter, configuring a camera according to the camera configuration parameter, controlling the camera to shoot an module image and collect the shot image, performing image processing and defect inspection on the collected original image, and outputting a defect inspection result and processed image data. The device and the method provided by the invention have the advantages that the image acquisition module, the PG module and the image processing module are integrated on an FPGA (Field Programmable Gate Array), and the whole testing process is performed based on the FPGA, so that the system integration degree is improved, the interaction complexity is lowered, the real-time processing performance is improved, the defect inspection time is shortened, the system stability is greatly improved, the inspection time is shortened, and the factory production efficiency is improved.