The arginine dihydrolase metabolic pathway (arc operon) is present in the genomes of diverse human gut bacterial species and can modulate environmental pH. We lack an understanding of the role of this pathway on community-level interactions. We investigated the role of the arc operon in the probiotic E. coli Nissle on the assembly and production of the beneficial metabolite butyrate in a human gut community in vitro and in the murine gut. The presence of the arc operon shapes the dynamics of community assembly. With arc operon expression, we observed reduced variability in community structure from environmental pH perturbations. In particular, the abundance of butyrate producers was altered either transiently or longer-term. The arc operon can enhance or reduce butyrate production depending on the environmental pH. Dynamic computational modeling of community assembly reveals the extent of pH-mediated inter-species interactions on community assembly. Several species are identified with significant beneficial or detrimental non-pH-mediated interactions. Overall, we demonstrated that a single specialized metabolic pathway could shape community assembly, species colonization of the mammalian gut and butyrate production.