The consumption of milk contaminated with antibiotic-resistant bacteria poses a significant health threat to humans. This study aimed to investigate the prevalence of Enterobacteriaceae producing β-lactamases (ESBL, MBL, and AmpC) in cow and buffalo milk samples from two Indian states, Haryana and Assam. A total of 401 milk samples were collected from dairy farmers and vendors in the specified districts. Microbiological assays, antibiotic susceptibility testing, and PCR-based genotyping were employed to analyze 421 Gram-negative bacterial isolates. The overall prevalence of β-lactamase genes was 10% (confidence interval (CI) (7–13)), with higher rates in Haryana (13%, CI (9–19)) compared to Assam (7%, CI (4–11)). The identified β-lactamase genes in isolates were blaCMY, blaMOX, blaFOX, blaEBC, and blaDHA, associated with AmpC production, while blaCTX-M1, blaSHV, and blaTEM were detected as ESBL producers. While blaVIM, blaIMP, blaSPM, blaSIM, and blaGIM were identified as MBL producers. Notably, Shigella spp. were the dominant β-lactamase producers among identified Enterobacteriaceae. This study highlights the presence of various prevalent β-lactamase genes in milk isolates, indicating the potential risk of antimicrobial-resistant bacteria in dairy products. The presence of β-lactam resistance raises concern as this could restrict antibiotic options for treatment. The discordance between genotypic and phenotypic methods emphasizes the necessity for comprehensive approaches that integrate both techniques to accurately assess antibiotic resistance. Urgent collaborative action incorporating rational and regulated use of antibiotics across the dairy value chain is required to address the global challenge of β-lactam resistance.