This paper presents a novel approach to enhance intrusion detection in Smart Grids (SGs) by integrating fog-edge computing and federated learning (FL) with a Support Vector Machine (SVM). The proposed system aims to address the vulnerabilities of Advanced Metering Infrastructure (AMI) technology, which is crucial for SGs but is susceptible to various attacks. Traditional IDS models, often trained on cloud servers, pose significant privacy risks and scalability issues, especially when dealing with large volumes of distributed data. The proposed fog-edge-enabled IDS leverages FL to train Edge devices collaboratively, ensuring data privacy while enabling high-quality model development. The system architecture includes a fog layer that acts as a coordination point for local models, allowing for real-time processing and reduced latency. The effectiveness of the proposed model is demonstrated through benchmark evaluations using the NSL-KDD and CICIDS2017 datasets, showing improvements in accuracy, recall, precision, and F1 scores. The key contributions of the paper include a decentralized SVM-based collaborative model, a distributed layered architecture with a fog-edge layer, and a comprehensive threat model for SGs. The proposed approach enhances intrusion detection accuracy, preserves user data privacy, and improves the overall security and resilience of SG systems.This paper presents a novel approach to enhance intrusion detection in Smart Grids (SGs) by integrating fog-edge computing and federated learning (FL) with a Support Vector Machine (SVM). The proposed system aims to address the vulnerabilities of Advanced Metering Infrastructure (AMI) technology, which is crucial for SGs but is susceptible to various attacks. Traditional IDS models, often trained on cloud servers, pose significant privacy risks and scalability issues, especially when dealing with large volumes of distributed data. The proposed fog-edge-enabled IDS leverages FL to train Edge devices collaboratively, ensuring data privacy while enabling high-quality model development. The system architecture includes a fog layer that acts as a coordination point for local models, allowing for real-time processing and reduced latency. The effectiveness of the proposed model is demonstrated through benchmark evaluations using the NSL-KDD and CICIDS2017 datasets, showing improvements in accuracy, recall, precision, and F1 scores. The key contributions of the paper include a decentralized SVM-based collaborative model, a distributed layered architecture with a fog-edge layer, and a comprehensive threat model for SGs. The proposed approach enhances intrusion detection accuracy, preserves user data privacy, and improves the overall security and resilience of SG systems.