In modern society, the proliferation of electric vehicles (EVs) is continuously increasing, presenting new challenges that necessitate integration with smart grids. The operational data from electric vehicles are voluminous, and the secure storage and management of these data are crucial for the efficient operation of the power grid. This paper proposes a novel system that utilizes blockchain technology to securely store and manage the black box data of electric vehicles. By leveraging the core characteristics of blockchain—immutability and transparency—the system records the operational data of electric vehicles and uses federated learning (FL) to predict their energy consumption based on these data. This approach allows the balanced management of the power grid’s load, optimization of energy supply, and maintenance of grid stability while reducing costs. Additionally, the paper implements a searchable black box data storage system using a public blockchain, which offers cost efficiency and robust anonymity, thereby enhancing convenience for electric vehicle users and strengthening the stability of the power grid. This research presents an innovative approach to the integration of electric vehicles and smart grids, exploring ways to enhance the stability and energy efficiency of the power grid. The proposed system has been validated through real data and simulations, demonstrating its effectiveness and performance in managing black box data and predicting energy consumption, thereby improving the efficiency and stability of the power grid. This system is expected to empower electric vehicle users with data ownership and provide power suppliers with more accurate energy demand predictions, promoting sustainable energy consumption and efficient power grid operations.