Mangroves are one of the most important wetland ecosystems. The development of fisheries in tropical and subtropical bays or estuaries is closely associated with mangroves since the high heterogeneity of the mangrove ecosystem provides a suitable habitat for marine organisms. However, multiple factors have led to a significant reduction in mangroves, such as water pollution, disease, insect pests, invasive alien species, and climate change. It is crucial to understand the relationships among organisms, as well as the interactions between organisms and their environment, by studying the ecological niche width and overlap of species. Therefore, two new perspectives of ecological niche width and ecological niche overlap were used to understand the interspecific ecological relationships, competition mechanisms, and resource utilization status of fish communities in mangrove forests. Based on the data collected during seasonal sampling in July 2019 (summer), October 2019 (autumn), January 2020 (winter), and May 2020 (spring) in the Nanliujiang Estuary, the index of relative importance (IRI), Shannon index, and Pianka index were employed to analyze the temporal and spatial niche of the main fish species in the mangrove creeks and to study niche differentiation among the main fish species by redundancy analysis. A total of 17,680 individual fish were collected in this study, belonging to 12 orders, 23 families, 37 genera, and 45 species. Ten main fish species with IRI>100 were identified. Among the main fish species, the temporal niche breadth ranged from 0.46 to 1.78, with the highest of which belonging to Butis butis (1.78) and the lowest belonging to Pseudogobius javanicus (0.46). The spatial niche breadth ranged from 0.81 to 2.05, with the highest of which belonging to Synechogobius ommaturus (2.05) and the lowest belonging to P. javanicus (0.81). The spatiotemporal niche breadth of six species was greater than 2 (wide-niche species) that included Mugil cephalus, Coptodon zillii, Bostrychus sinensis, S. ommaturus, B. butis, and Pisodonophis boro. With regard to overlap, the temporal niche overlap between M. cephalus and P. javanicus was the highest (0.928), whereas that between Ambassis urotaenia and Terapon jarbua (0.001) was the lowest. The spatial niche overlap between A. urotaenia and Gambusia affinis was the highest (0.979), whereas that between M. cephalus and P. javanicus (0.178) was the lowest. Finally, the spatiotemporal niche overlap between C. zillii and P. javanicus was the highest (0.822), whereas that between A. urotaenia and Terapon jarbua (0.001) was the lowest. The two-dimensional temporal and spatial niche pairs in the mangrove creeks of the Nanliujiang River Estuary significantly overlapped (Qik > 0.6), accounting for 6.7% of the total species pairs, indicating that the temporal and spatial distributions of species were quite different and the temporal and spatial niche overlap was affected by seasonal changes. Redundancy analysis revealed that the main factors affecting spatiotemporal niche differentiation of the main fish species in the mangrove creeks of the Nanliujiang Estuary were water temperature, salinity, and Chlorophyll a. And the main fish biomass in winter was positively correlated with salinity; the main fish biomass in spring was positively correlated with dissolved oxygen, pH and Chlorophyll a; the main fish biomass in summer was positively correlated with total organic carbon, water temperature and Chlorophyll a; the main fish biomass in autumn was positively correlated with total nitrogen, turbidity and total phosphorus.