In China, aquaculture is the primary source of aquatic products due to the decrease in wild fishery resources. In 2018, the total output of aquatic products in China expanded to 47.6 million tons, accounting for 58% of global aquaculture production. Intensive culture methods generally use significant quantities of feed however, approximately 75% of nitrogen in the feed is retained in aquaculture water, mainly as soluble nitrogen, such as ammonia nitrogen (NH4+-N) and nitrate (NO3–-N), owing to low feed-utilization rates during cultivation. At the same time, fishes generate a substantial amount of excreta, which will cause the increase of nitrogen compounds in water and negatively affects the quality of aquatic products. Serious problems could occur if nitrogen compounds are discharged into the environment, including the eutrophication of rivers, the deterioration of drinking water sources, and hazards to human health. Furthermore, nitrates can form potentially carcinogenic compounds, such as nitrosamines and nitrosamides, and nitrate consumption can cause methemoglobinemia in infants. The Second National Census of Pollution Sources survey showed that the total nitrogen emission from aquaculture was 99 100 tons in 2017. To protect the environment and human health, it is important to remove nitrogen from aquaculture tailwater before discharging it to the surrounding waters. Biological denitrification is considered the most promising approach since nitrate can be reduced to harmless nitrogen gas by bacteria. A sufficient carbon source is necessary during the heterotrophic denitrification process. To solve the problems mentioned above, external liquid carbon sources such as methanol, acetic acid, and glucose are added to the tailwater, but they are costly, require high-energy, and have high operating requirement. In contrast, agricultural wastes as a carbon source have exhibited significant economic advantages and high efficiency. Many aquaculture tailwater treatment systems often face variations in hydraulic retention times (HRT) and influent nitrate concentration (INC), which are caused by acute changes in tailwater characteristics and production, and HRT and INC often exert a profound effect on the treatment performance of biological treatment systems. Extensive research has confirmed that adding agricultural waste (such as corncob, woodchip and rice straw) to municipal sewage and industrial wastewater can effectively improve denitrification efficiency. However, the effect of using agricultural waste as denitrifying carbon source to treat aquaculture tail water remains unclear. Banana stalk (BS), a typical agricultural waste product, is used as a denitrifying carbon source for the first time in this study. The study investigated the effects of HRT and INC on the denitrification performance of BS, and provided a theoretical basis for the application of agricultural waste in aquaculture tailwater treatment. In this study, using BS as a carbon source and a towel as biological carrier, the performance of solid-phase denitrification under dynamic flow conditions was studied by using a 1-D column experiment. In the HRT optimization experiment, INC was maintained at 50 mg/L and operated under four HRTs (16 h, 20 h, 24 h and 28 h) for 14 days. The effluent NO3–-N, nitrite (NO2–-N), NH4+-N, Total nitrogen (TN), Total phosphorus (TP), and chemical oxygen demand (COD) removal efficiency were measured every 2 days. The optimal HRT of BS-DR (banana stalk-denitrification reactor) was optimized by one-way ANOVA analysis. Then, based on the optimization of HRT, the reactor was operated for 14 days under different INC (75 mg/L, 100 mg/L, and 125 mg/L). The sampling time interval and measurement indexes were the same as those of the HRT optimization experiment. The Illumina MiSeq high-throughput sequencing method was used to sequence and analyze the two hyper-variable regions (V3-V4) of the 16S rRNA gene of bacteria in the initial and final stages of the BS-DR. The results indicated that HRT and INC are the key factors affecting the denitrification performance of BS-DR. There was no significant difference in nitrate removal efficiency when the HRT was 20 h (96.71±1.36)%, 24 h (94.57±4.73)%, and 28 h (99.41±0.64)%, but they were significantly higher than that when the HRT was 16 h (87.53±7.95)%. Therefore, the optimal HRT for BS-DR was 20 h, and no nitrite accumulation. The second set of experiments was conducted using the optimal HRT obtained from the first set of experiments. The effluent nitrate concentration (ENC) and nitrate removal rate (NRR) of BS-DR increased significantly with increase in INC (P < 0.05), and the effluent COD decreased with increase in INC, and the proper INC for BS-DR was ≤50 mg/L. It is worth noting that BS-DR could completely remove NH4+-N in both experiments. In addition, HRT significantly affects the removal efficiency of TP, but INC has little effect. According to pyrosequencing analysis, the microbial community structure of BS-DR changed after long-term operation, with the relative abundances of Proteobacteria, Bacteroidetes, Campilobacterota, and Firmicutes increasing to 31.20%, 6.67%, 3.08%, and 4.26%, respectively, ensuring the efficient operation of the reactor. On the contrary, the relative abundances of Halobacterota, Desulfobacterota, Sva0485, Chloroflexi, and Verrucomicrobiota decreased to 10.39%, 5.13%, 2.82%, 2.00%, and 1.17 %, respectively, in the reactor. In addition, at the genus level, most of the dominant bacteria at the end of reactor operation play a role in denitrification and degradation of agricultural waste, which is significantly different from that at the beginning of the reactor operation.