To tackle the challenge of improving Power Quality (PQ) in modern power grids, we introduce an innovative IoT-based Smart Grid (SG) energy surveillance system. Our research is driven by the necessity to enhance power quality and optimize energy management in increasingly complex grids that incorporate renewable energy sources like Solar PV and Wind Generating Systems. Traditional methods for managing power quality often fall short, resulting in inefficiencies and potential disruptions. Our solution features an advanced IoT-based system that utilizes the Adaptive Neuro-Fuzzy Inference System (ANFIS), combining Artificial Neural Networks (ANN) and Fuzzy Logic Systems to enhance power distribution and control. This system uses a Wireless Sensor Network for real-time data collection and analysis, allowing for precise monitoring of electricity usage and improved energy management and cost reduction. Our findings indicate that this innovative approach not only boosts power quality but also significantly enhances the efficiency of renewable energy sources, showing a 20.50% performance increase during the startup phase of Solar PV-Wind Generating Systems. This highlights the system’s potential to advance power quality management and provide substantial benefits in energy regulation and cost efficiency.