Near-infrared (NIR) spectroscopy is one of the most successful pharmaceutical process analytical tools. For botanical drug products (BDPs), many studies have applied NIR spectroscopy for rapid analysis of botanical raw materials, extracts and formulations. However, the real-time process analysis reported for BDPs was still mainly conducted on lab- or pilot- scale equipment, where some essential conditions of the materials and process parameters can be easily controlled for NIR spectral measurement. Due to the chemical and physical characteristics of the commercial production of BDPs, it is challenging to develop in-line NIR methods with enough robustness for industrial-scale application. This is the first reported case study of the development and validation of the in-line NIR method for the commercial production of BDPs, taking Compound Danshen Dripping Pill (CDDP) as an example. An in-line NIR method was developed for simultaneous measurement of the three critical quality attributes, i.e. the relative density, the moisture content and the content of 3,4-dihydroxyphenyl lactic acid (danshensu, a key active compound), during the extract concentration process. The NIR spectra and sample collection lasted for three years (67 production batches) to cover the variability of raw materials and process conditions. NIR calibration models were established respectively, with determination coefficients (r2) of 0.9905, root mean square errors of prediction (RMSEP) of 0.004 for the relative density in the range of 1.042–1.184; r2 of 0.9870, RMSEP of 1.1% for the moisture content in the range of 50.8–83.0%; r2 of 0.9870, RMSEP of 0.461 mg/g for danshensu in the range of 2.563–8.869 mg/g. Then, all the method validation parameters (accuracy, precision, range, specificity, linearity, robustness, detection and quantitation limits) were discussed according to the characteristics of the commercial production of BDPs. The NIR method development and validation strategy proposed may also be applied in the future for the commercial production of other BDPs.