Marine harbors a diverse and intricate microbial ecosystem crucial for driving biogeochemical and nutrient cycles. To gain insights into the ecological functions of microbial communities in deep-sea sediments and their responses to biogeochemical cycling, this study investigated microbial dynamics within the East Indian Ocean (EIO) ridge, focusing on vertical stratification of sediment communities. Notably, depth-related microbial patterns surpassed regional stratification effects. Environmental factors, such as TN and NO2–-N, significantly shaped community structures, while stochastic processes, particularly homogenizing dispersal, contributed to spatial similarity and structural stability. In this challenging environment, bacterial and archaeal communities established symbiotic relationships for enhanced survival, and dominated carbon and nitrogen biogeochemical cycling processes, respectively. Key bacterial genera acted as bridging agents, orchestrating intricate interactions, while archaeal communities displayed greater dispersion. Metabolic pathways analyses revealed that bacterial community was characterized by denitrification and DNRA processes, while archaea were dominated by the nirK-encoded denitrification pathway. Ultimately, this study shed light on nuanced interactions and ecological roles of microbial communities, contributed to broader understanding of biogeochemical processes and global carbon/nitrogen sinks.