Ensuring data privacy and operational security has become critical in light of escalating cyber threats and the logistical complexity of autonomous maritime operations. Autonomous maritime systems face such challenges in securely processing and managing large amounts of real-time data while maintaining resilience against cyber attacks. This paper considers these challenges by presenting a federated privacy-preserving UAV data collection framework to optimize autonomous path planning and protect sensitive maritime information. Using UAVs as edge nodes for decentralized data processing allows the framework to integrate federated learning, maintain data privacy, and improve cybersecurity. The proposed framework contains five distinct layers, where the data collection layer's role is to collect real-time data on vessel and environmental conditions. The privacy-preserving edge intelligence layer enables secure localized data processing at the edge. The threat mitigation and optimization layer performs machine learning models for route optimization and intrusion detection. The orchestration layer is implemented to coordinate UAV operations and manages aggregated model parameters for system-wide efficiency, whereas the user interaction layer provides operators with secure, real-time insights into system performance and operational metrics. Simulations and implementations demonstrate that this multilayered architecture improves route accuracy, fortifies data security, and achieves a 20% reduction in emissions, underscoring its potential to advance autonomous navigation and secure, efficient mission planning in maritime cyber–physical systems. The proposed edge-intelligent federated UAV system demonstrates superior performance compared to other approaches, achieving the highest accuracy (99.1%), F1 score (98.9%), and recall (99.3%), while utilizing a larger hybrid dataset (80,000 samples) with 30 features, optimized through principal component analysis, and addressing multiple target attributes such as CO