Microbiologically influenced corrosion (MIC) accounts for approximately 20% of the total corrosion-related losses worldwide, causing significant economic damage each year, particularly in Marine environments. However, there are still no truly effective and eco-friendly protection solutions against MIC, among which the incomplete understanding of the microbial biofilm development on metallic surface is a key limitation. Using 16S rRNA and ITS sequencing, we studied bacterial and fungal communities in rust layer biofilm and seawater. The results showed that Proteobacteria, Cyanobacteria and Bacteroidota were the dominant bacterial phyla, and Ascomycota and Basidiomycota were the dominant fungal phyla both in the rust layer biofilm and seawater. Bacteria like Erythrobacter and Aquimarina, as well as fungi like Aspergillus and Acremonium were were notable microorganisms in the rust layer biofilm. Source analysis revealed differences between biofilm and seawater communities, with 23.08% bacterial and 21.48% fungal communities originating from seawater. Stochastic processes governed biofilm and seawater microbial communities, and network analysis showed coexistence and interaction among bacteria and fungi.IMPORTANCEThe composition and source analysis of bacterial and fungal communities in the rust layer and seawater were studied, and the interaction of bacteria and fungi in the rust layer was discussed for the first time. Based on these findings, we provided a framework to explain the observed characteristics of microbial communities in rust layer biofilm and presented key evidence supporting the relationship between different microbial structures and interactions with metal corrosion. These findings, from the perspective of microbial ecology, provide a theoretical foundation for studying microbial corrosion in marine environments.