Supplemental sources of Mg can also aid in ruminal pH regulation due to their alkaline properties. Magnesium oxide (MgO) is the most common source of Mg for ruminants and can help controlling ruminal pH; however, the alkaline potential of other sources of Mg has not been evaluated. We aimed to evaluate the inclusion of calcium–magnesium carbonate (CaMg(CO3)2) and calcium–magnesium hydroxide (CaMg(OH)4) alone or in combination as supplemental sources of Mg in corn silage-based diets and its impact on ruminal microbial fermentation. We hypothesized that inclusion of CaMg(OH)4 would allow for ruminal fermentation conditions resulting in a greater pH compared to the inclusion of CaMg(CO3)2. Four treatments were defined by the supplemental source of Mg in the diet: 1) Control (100% MgO, plus sodium sesquicarbonate as a buffer); 2) CO3 [100% CaMg(CO3)2]; 3) OH [100% CaMg(OH)4]; and 4) CO3/OH [50% Mg from CaMg(CO3)2, 50% Mg from CaMg(OH)4]. Nutrient concentration was held constant across treatments (16% CP, 30% NDF, 1.66 Mcal NEl/kg, 0.67% Ca, and 0.21% Mg). Four fermenters were used in a 4 × 4 Latin square design with four periods of 10 d each. Samples were collected for analyses of nutrient digestibility, soluble Mg, VFA, and NH3, while pH was measured at 0, 1, 2, 4, 6, 8, and 10 h post morning feeding to estimate % time when pH was below 6 (pH-B6) and area under the pH curve for pH below 6.0 (pH-AUC). Bacteria pellets were harvested for 15N analysis and estimates of N metabolism. Treatment effects were analyzed with the mixed procedure of SAS, while effects of using either CaMg(CO3)2 or CaMg(OH)4 as Mg source in comparison to Control treatment were evaluated by orthogonal contrasts. Similar pH-related variables were observed for Control, OH, and CO3/OH treatments, which had smaller pH-AUC and pH-B6 than CO3 (P ≤ 0.01). Butyrate molar proportion was greater in Control and CO3/OH than in CO3 and OH (P = 0.04). Orthogonal contrasts showed lower flow of bacterial N (P = 0.04), lower butyrate molar proportion (P = 0.08) and greater pH-AUC (P = 0.05) for diets with CaMg(CO3)2 in comparison with the Control. Concentration of soluble Mg in ruminal fluid (P = 0.73) and nutrient digestibility (P ≥ 0.52) were similar across treatments. Under the conditions of this experiment, using CaMg(OH)4 alone or combined with CaMg(CO3)2 allowed for a less acidic ruminal fermentation pattern than a diet with only CaMg(CO3)2.