The avian influenza virus (AIV) impacts poultry production, food security, livelihoods, and the risk of transmission to humans. Poultry, like pigeons and quail farming, is a growing sector in Bangladesh. However, the role of pigeons and quails in AIV transmission is not fully understood. Hence, we conducted this study to investigate the prevalence and risk factors of AIV subtypes in pigeons and quails at live bird markets (LBMs) in Bangladesh. We collected oropharyngeal and cloacal swab samples from 626 birds in 8 districts of Bangladesh from 2017 to 2021. We tested the swab samples for the matrix gene (M gene) followed by H5, H7, and H9 subtypes using real-time reverse transcriptase-polymerase chain reaction (rRT-PCR). We then used exploratory analysis to investigate the seasonal and temporal patterns of AIV and a mixed effect logistic model to identify the variable that influences the presence of AIV in pigeons and quails. The overall prevalence of AIV was 25.56%. We found that the prevalence of AIV in pigeons is 17.36%, and in quail is 38.75%. The prevalence of A/H5, A/H9, and A/H5/H9 in quail is 4.17, 17.92, and 1.67%, respectively. Furthermore, the prevalence of A/H5, A/H9, and A/H5/H9 in pigeons is 2.85, 2.59, and 0.26%. We also found that the prevalence of AIV was higher in the dry season than in the wet season in both pigeons and quail. In pigeons, the prevalence of A/untyped (40%) increased considerably in 2020. In quail, however, the prevalence of A/H9 (56%) significantly increased in 2020. The mixed-effect logistic regression model showed that the vendors having waterfowl (AOR: 2.13; 95% CI: 1.04-4.33), purchasing birds from the wholesale market (AOR: 2.96; 95% CI: 1.48-5.92) instead of farms, mixing sick birds with the healthy ones (AOR: 1.60; 95% CI: 1.04-2.45) and mingling unsold birds with new birds (AOR: 3.07; 95% CI: 2.01-4.70) were significantly more likely to be positive for AIV compared with vendors that did not have these characteristics. We also found that the odds of AIV were more than twice as high in quail (AOR: 2.57; 95% CI: 1.61-4.11) as in pigeons. Furthermore, the likelihood of AIV detection was 4.19 times higher in sick and dead birds (95% CI: 2.38-7.35) than in healthy birds. Our study revealed that proper hygienic practices at the vendors in LBM are not maintained. We recommend improving biosecurity practices at the vendor level in LBM to limit the risk of AIV infection in pigeons and quail in Bangladesh.