Intrusion detection is an effective means of ensuring the proper functioning of industrial control systems (ICSs). Most intrusion detection algorithms learn the historical ICS data to gain the ability to identify and detect intrusions. However, there is little abnormal historical data used to train intrusion detection systems, so algorithms cannot fully learn the characteristics of erroneous data and cannot fully utilize an algorithm. We propose a data balancing method called B-GAN. It is based on generative adversarial networks used to solve the data imbalance problem. The method improves the ability of intrusion detection models to identify intrusions. ICS datasets are continuously built, so the generator and discriminator of B-GAN use the long short-term memory (LSTM) networks model. They can better capture the features of the data and generate high-quality anomaly samples. The performance bottleneck of traditional models is caused by data imbalance, but this has been improved. Our proposed method balances different open datasets, and a dataset balanced by B-GAN has been verified with standard intrusion detection methods. The experimental results demonstrate an improvement in the performance of intrusion detection.