Avian influenza viruses (AIV) have been frequently detected in live bird markets (LBMs) around the world, primarily in urban areas, and have the ability to spillover to other species, including humans. Despite frequent detection of AIV in urban LBMs, the contamination of AIV on environmental surfaces in rural and peri-urban LBMs in Bangladesh is poorly documented. Therefore, we conducted this study to determine the prevalence of AIV subtypes within a subset of peri-urban and rural LBMs in Bangladesh and to further identify associated risk factors. Between 2017 and 2018, we collected faecal and offal samples from 200 stalls in 63 LBMs across four sub-districts. We tested the samples for the AIV matrix gene (M-gene) followed by H5, H7, and H9 subtypes using real-time reverse transcriptase-polymerase chain reaction (rRT-PCR). We performed a descriptive analysis of market cleanliness and sanitation practices in order to further elucidate the relationship between LBM biosecurity and AIV subtypes by species, sample types, and landscape. Subsequently, we conducted a univariate analysis and a generalized linear mixed model (GLMM) to determine the risk factors associated with AIV contamination at individual stalls within LBMs. Our findings indicate that practices related to hygiene and the circulation of AIV significantly differed between rural and peri-urban live bird markets. 42.5% (95% CI: 35.56–49.67) of stalls were positive for AIV. A/H5, A/H9, and A HA/Untyped were detected in 10.5% (95% CI: 6.62–15.60), 9% (95% CI: 5.42–13.85), and 24.0% (95% CI: 18.26–30.53) of stalls respectively, with no detection of A/H7. Significantly higher levels of AIV were found in the Sonali chicken strain compared to the exotic broiler, and in offal samples compared to fecal samples. In the GLMM analysis, we identified several significant risk factors associated with AIV contamination in LBMs at the stall level. These include: landscape (AOR: 3.02; 95% CI: 1.18–7.72), the number of chicken breeds present (AOR: 2.4; 95% CI: 1.01–5.67), source of birds (AOR: 2.35; 95% CI: 1.0–5.53), separation of sick birds (AOR: 3.04; 95% CI: 1.34–6.92), disposal of waste/dead birds (AOR: 3.16; 95% CI: 1.41–7.05), cleaning agent (AOR: 5.99; 95% CI: 2.26–15.82), access of dogs (AOR: 2.52; 95% CI: 1.12–5.7), wild birds observed on site (AOR: 2.31; 95% CI: 1.01–5.3). The study further revealed a substantial prevalence of AIV with H5 and H9 subtypes in peri-urban and rural LBMs. The inadequate biosecurity measures at poultry stalls in Bangladesh increase the risk of AIV transmission from poultry to humans. To prevent the spread of AIV to humans and wild birds, we suggest implementing regular surveillance at live bird markets and enhancing biosecurity practices in peri-urban and rural areas in Bangladesh.