Intrusion detection systems (IDS) are crucial for maintaining the security and integrity of Internet of Vehicles (IoV) configurations. However, traditional IDS systems face issues such as scalability, flexibility in changing IoV settings, and privacy concerns due to centralized data collection. The increasing number of networked cars in the IoV poses significant security concerns, including identifying and mitigating cyberattacks. We need a more effective, privacy-preserving IDS solution, and Federated Learning (FL) emerges as a promising option. The paper suggests using a Federated Learning Framework memory-augmented deep autoencoder for intrusion detection systems (FLF-MADAE) on the IoV to make it safer and fix common IDS issues at the same time. However, autoencoders can generalize and reconstruct anomalies, potentially causing them to go undetected. To address this issue, we propose a memory module named MADAE, which retrieves encoded versions from the encoder and employs a query to select the optimal memory objects for reconstruction. The training phase involves updating memory contents and encouraging them to reflect the usual data items. We tested the effectiveness of the proposed strategy on the car hacking and CSE-CIC-IDS-2018 intrusion detection datasets. Experimental results show that on the CSE-CIC-IDS-2018 dataset, FLF-MADAE has the highest accuracy level of 99.12% and an F1 score of 99.21%; for the car hacking dataset, MADAE has the highest accuracy level of 99.24% and an F1 score of 98.77%.