In the current pandemic, smart technologies such as cognitive computing, artificial intelligence, pattern recognition, chatbot, wearables, and blockchain can sufficiently support the collection, analysis, and processing of medical data for decision making. Particularly, to aid medical professionals in the disease diagnosis process, cognitive computing is helpful by processing massive quantities of data rapidly and generating customized smart recommendations. On the other hand, the present world is facing a pandemic of COVID-19 and an earlier detection process is essential to reduce the mortality rate. Deep learning (DL) models are useful in assisting radiologists to investigate the large quantity of chest X-ray images. However, they require a large amount of training data and it needs to be centralized for processing. Therefore, federated learning (FL) concept can be used to generate a shared model with no use of local data for DL-based COVID-19 detection. In this view, this paper presents a federated deep learning-based COVID-19 (FDL-COVID) detection model on an IoT-enabled edge computing environment. Primarily, the IoT devices capture the patient data, and then the DL model is designed using the SqueezeNet model. The IoT devices upload the encrypted variables into the cloud server which then performs FL on major variables using the SqueezeNet model to produce a global cloud model. Moreover, the glowworm swarm optimization algorithm is utilized to optimally tune the hyperparameters involved in the SqueezeNet architecture. A wide range of experiments were conducted on benchmark CXR dataset, and the outcomes are assessed with respect to different measures . The experimental outcomes pointed out the enhanced performance of the FDL-COVID technique over the other methods.