Tablet coating is a critical process in solid dosage form manufacturing, in which coating thickness, as a critical quality attribute, directly influences the tablet's appearance, stability, and release behavior. Conventional offline detection methods are unable to achieve real-time monitoring and control, thereby restricting product uniformity and manufacturing automation. To overcome these limitations, this study developed an in-line monitoring and dynamic control system for tablet coating thickness using near-infrared spectroscopy (NIRS). A Box-Behnken experimental design was employed to investigate the effects of spray pressure, inlet air temperature, and spray gun distance on film thickness. The results revealed significant negative correlations between inlet air temperature and spray gun distance with coating thickness. The optimal conditions were determined to be a spray pressure of 0.8 bar, an inlet air temperature of 44 °C, and a spray gun distance of 15 cm. In-line coating experiments were performed under these optimized conditions. NIR spectra were collected, and a partial least squares (PLS) regression model was established, achieving excellent predictive performance on the test set (R2 = 0.9078, RMSEP = 9.8133 μm, RPD = 2.3211), thus enabling high-precision, real-time prediction of coating thickness. By integrating a proportional-integral-derivative (PID) control strategy, process parameters were automatically adjusted based on NIRS predictions, enabling dynamic feedback and closed-loop control of film thickness. This study confirms the advantages of NIRS for real-time, non-destructive monitoring in tablet coating and highlights the potential of combining spectral modeling with feedback control for intelligent pharmaceutical manufacturing and quality traceability within the process analytical technology (PAT) and quality by design (QbD) frameworks.