In today's world, the importance of the Green Internet of Things (GIoT) in the transformed sustainable smart cities cannot be overstated. For a variety of applications, the GIoT may make use of advanced machine learning (ML) methodologies. However, owing to high processing costs and privacy issues, centralized ML-based models are not a feasible option for the large data kept at a single cloud server and created by multiple devices. In such circumstances, edge-based computing may be used to increase the privacy of GIoT networks by bringing them closer to users and decentralizing them without requiring a central authority in such circumstances. Nonetheless, enormous amounts of data are stored in a distribution mechanism, and managing them for application purposes remains a difficulty. Hence, federated learning (FL) is one of the most promising solutions for bringing learning to end devices through edge computing without sharing private data with a central server. Therefore, the paper proposes a federated learning-enabled edgebased GIoT system, which seeks to improve the communication strategy while lowering liability in terms of energy management and data security for data transmission. The proposed model uses FL to produce feature values for data routing, which could aid in sensor training for identifying the best routes to edge servers. Furthermore, combining FL-enabled edge-based techniques simplifies security solutions while also allowing for a more efficient computing system. The experimental results show an improved performance against existing models in terms of network overhead, route interruption, energy consumption, and end-toend delay, route interruption.INDEX TERMS Federated learning, Network overhead, Energy consumption, Edge computing, Green Internet of Things, Security and privacy, End-to-end delay, Route interruption.