This study utilizes mathematical modeling, including difference and differential equations, to analyze the impact of gender ratio changes in seven-gill eels on ecosystem dynamics. The model incorporates population growth, gender ratio variations, and interactions with other ecosystem components. The findings reveal that a balanced sex ratio supports optimal population growth and ecosystem stability, while a male-dominated population reduces biodiversity and increases resource competition. Food availability and predator presence significantly affect the sex ratio, influencing the ecosystem's overall health. Using the TOPSIS method, the study determines that a higher proportion of females is most beneficial for ecosystem stability. Maintaining an optimal sex ratio is essential for ecosystem health, providing valuable insights for conservation and management efforts.