BackgroundWastewater-based epidemiological surveillance has been considered a powerful tool for early detection and monitoring of the dynamics of SARS-CoV-2 and its lineages circulating in a community. This study is aimed to investigate the complexity of SARS-CoV-2 infection dynamics in Dhaka city by examining its genetic variants in wastewater. Also, the study seeks to determine a connection between the SARS-CoV-2 variations detected in clinical testing and those found in wastewater samples.ResultsOut of 504 samples tested in RT-qPCR, 185 (36.7%) tested positive for SARS-CoV-2 viral RNA. The median log10concentration of SARS-CoV-2 N gene copies/Liter of wastewater (gc/L) was 5.2, and the median log10concentration of ORF1ab was 4.9. To further reveal the genetic diversity of SARS-CoV-2, ten samples with ORF1ab real-time RT-PCR cycle threshold (Ct) values ranging from 28.78 to 32.13 were subjected to whole genome sequencing using nanopore technology. According to clade classification, sequences from wastewater samples were grouped into 4 clades: 20A, 20B, 21A, 21J, and the Pango lineage, B.1, B.1.1, B.1.1.25, and B.1.617.2, with coverage ranging from 94.2 to 99.8%. Of them, 70% belonged to clade 20B, followed by 10% to clade 20A, 21A, and 21J. Lineage B.1.1.25 was predominant in Bangladesh and phylogenetically related to the sequences from India, the USA, Canada, the UK, and Italy. The Delta variant (B.1.617.2) was first identified in clinical samples at the beginning of May 2021. In contrast, we found that it was circulating in the community and was detected in wastewater in September 2020.ConclusionEnvironmental surveillance is useful for monitoring temporal and spatial trends of existing and emerging infectious diseases and supports evidence-based public health measures. The findings of this study supported the use of wastewater-based epidemiology and provided the baseline data for the dynamics of SARS-CoV-2 variants in the wastewater environment in Dhaka, Bangladesh.Supplementary InformationThe online version contains supplementary material available at 10.1186/s40246-023-00505-4.