Conventional white light imaging (WLI) endoscopy is the most common screening technique used for detecting early esophageal squamous cell carcinoma (ESCC). Nevertheless, it is difficult to detect and delineate margins of early ESCC using WLI endoscopy. This study aimed to develop an artificial intelligence (AI) model to detect and delineate margins of early ESCC under WLI endoscopy.A total of 13,083 WLI images from 1,239 patients were used to train and test the AI model. To evaluate the detection performance of the model, 1,479 images and 563 images were used as internal and external validation data sets, respectively. For assessing the delineation performance of the model, 1,114 images and 211 images were used as internal and external validation data sets, respectively. In addition, 216 images were used to compare the delineation performance between the model and endoscopists.The model showed an accuracy of 85.7% and 84.5% in detecting lesions in internal and external validation, respectively. For delineating margins, the model achieved an accuracy of 93.4% and 95.7% in the internal and external validation, respectively, under an overlap ratio of 0.60. The accuracy of the model, senior endoscopists, and expert endoscopists in delineating margins were 98.1%, 78.6%, and 95.3%, respectively. The proposed model achieved similar delineating performance compared with that of expert endoscopists but superior to senior endoscopists.We successfully developed an AI model, which can be used to accurately detect early ESCC and delineate the margins of the lesions under WLI endoscopy.