The rapid and non-destructive detection of pesticide residues in Hami melons plays substantial importance in protecting consumer health. However, the investment of time and resources needed to procure sample data poses a challenge, often resulting in limited data set and consequently leading insufficient accuracy of the established models. In this study, an innovative variant based on generative adversarial network (GAN) was proposed, named regression GAN (RGAN). It was used to synchronically extend the visible near-infrared (VNIR) and short-wave infrared (SWIR) hyperspectral data and corresponding acetamiprid residue content data of Hami melon. The support vector regression (SVR) and partial least squares regression (PLSR) models were trained using the generated data, and subsequently validate them with real data to assess the reliability of the generated data. In addition, the generated data were added to the real data to extend the dataset. The SVR model based on SWIR-HSI data achieved the optimal performance after data augmentation, yielding the values of Rp2, RMSEP and RPD were 0.8781, 0.6962 and 2.7882, respectively. The RGAN extends the range of GAN applications from classification problems to regression problems. It serves as a valuable reference for the quantitative analysis of chemometrics.