Network traffic detection systems play a critical role in the security of smart grid networks, as they are responsible for detecting and defending against various external attacks. Accurate network traffic anomaly detection is essential to ensure secure communication between power devices. However, traditional abnormal detection models often suffer from high false positive rates and inadequate detection performance. To address these issues, we propose an enhanced Bi-directional Generative Adversarial Network (BGAN) for network traffic anomaly detection. The BGAN model leverages the foundational framework of GAN to learn the distribution of complex traffic data. In this model, the discriminator incorporates a Bidirectional Gated Recurrent Unit (BiGRU) network to capture the temporal correlations of sequential distributions. Additionally, we introduce an attention mechanism to enhance the model's ability to identify relevant information between input data and current output data, thereby improving overall detection performance. To evaluate the effectiveness of our proposed method, we conducted experiments using multiple datasets. The results demonstrate that our approach surpasses the performance of other compared traffic abnormal detection methods.