Over the last few years, end devices’ rapid proliferation and development have placed obstacles on existing networks. New technologies have prompted attention to developing distributed and intelligent systems that protect data privacy. Federated Learning (FL) is a privacy-enhanced collaborative learning strategy that offers a model-based sharing mechanism rather than actual data to solve the hurdles of data privacy issues of participants’ data. This work suggested a blockchain-based FL system to replace the central server in conventional federated learning. We also verify the participants’ local model to detect the malicious model. This study examines the system performance by considering the participants’ IID and non-IID data distributions. To demonstrate the reliability of our suggested technique, we conducted an extensive experiment with popular datasets such as MNIST, EMNIST, CIFAR-10, and Fashion-MNIST.