Beta-lactam antibiotics are of vital importance for the treatment of infections in a broad range of patients. Although most systemically administered antibiotics will be excreted renally, a fraction will reach the gastro-intestinal tract, affecting the intestinal microbiome by eradicating a wide range of bacterial species while facilitating the growth of antimicrobial-resistant species. A better understanding of the kinetics of beta-lactam antibiotics in the gastro-intestinal tract is essential to study their role in the development of antibiotic resistance in bacteria and to help develop future therapies to prevent damage to, or restore, the intestinal microbiome. Analysis of beta-lactam antibiotics in faeces is particularly challenging due to the heterogeneous nature of the matrix, rapid degradation of some beta-lactam antibiotics in faeces and very strong ion suppression when using mass spectrometry. Sample preparation was optimized using a sequential strategy of experimental designs. It resulted in lyophilization, a MOPS buffer system and the addition of the beta-lactamase inhibitor avibactam to minimize degradation of antibiotics allowing sensitive quantification. The developed liquid chromatography method with high-resolution mass spectrometric detection was successfully validated according to bioanalytical EMA guidelines and had a linear range of 1–200 μg g−1 lyophilized faeces for amoxicillin, piperacillin and meropenem; and 0.5–100 μg g−1 lyophilized faeces for tazobactam. Despite the highly complex and heterogeneous composition of faeces, the accuracy (0.1–15%) and precision (1.7–12.1%) were in line with those obtained for quantification methods of beta-lactam antibiotics in plasma, the golden standard matrix for therapeutic drug monitoring. The applicability of the method was illustrated by successful quantification of piperacillin and tazobactam in faeces from an intensive care unit patient receiving piperacillin/tazobactam in a continuous intravenous infusion. Both piperacillin and tazobactam were still present six days after discontinuation of the therapy.