Alfalfa seed flour (ASF) at different inclusion levels (0% as control, 30% and 45% w/w) was used to prepare rice flour-based gluten-free (GF) cookies (CK). Samples underwent a simulated in vitro digestion and fermentation process. The comprehensive changes in the phenolic profiles were evaluated during 48 h of fermentation by means of untargeted UHPLC-QTOF mass spectrometry followed by multivariate statistics. Furthermore, the modifications in microbial profile and the production of short chain fatty acids (SCFA) were investigated. Cookies presenting 30% (30-CK) and 45% (45-CK) ASF possessed the greater total phenolic content when compared to the control, being 0.42 and 0.56 mg/g versus 0.15 mg/g, respectively. The orthogonal projection to latent structure discriminant analysis, applied to untargeted metabolomics-based data, showed a clear modulation of the profile in phenolic metabolites over time (from 8 up to 48 h of in vitro fermentation). In this regard, the in vitro fermentation of 30-CK and 45-CK resulted in the maximum increase in lignans and phenolic acids, whose bioaccessibility at 24 h of in vitro fermentation was 16.2% and 12.2%, respectively. In addition, the metagenomic sequencing approach allowed to identify in Clostridiaceae, Ruminococcaceae, Lachnospiraceae and Streptococcaceae the most represented bacterial populations during the in vitro fermentation. A greater total SCFA production (p < .05) was recorded overtime for all ASF-enriched cookies when compared to the control. Therefore, ASF proved to be an excellent alternative to common non-wheat cereal flours (such as pseudocereals or legumes) for improving possible health-promoting properties in GF cookie formulation.