We present an ecosystem model that describes the biogeochemistry of a sediment nitrate reducing microbial community. In the model, the microbial community is represented as a distributed metabolic network. Biogeochemical pathways are controlled through the synthesis and allocation of biological structure that serves to catalyze each process. Allocation is determined by way of a thermodynamically constrained optimization according to the principle of maximum entropy production (MEP). According to the MEP principle, ecosystems will organize so as to maximize the dissipation of free energy based upon the available resources (nutrients and electron donors and acceptors). In the model, 3 nitrate reduction pathways, viz. heterotrophic denitrification, anammox, and dissimilatory nitrate reduction to ammonium, compete for electron acceptors (nitrate and nitrite). The model predicts switches in the dominant nitrate cycling pathways based upon the ratio of carbon to nitrate supply. An advantage of this approach over a traditional organism-centric kinetic approach is that the Monod growth parameters, maximum uptake rate (?max), and half saturation (kM) constants are determined during the optimization procedure as opposed to parameters specified a priori. Such a model is therefore useful for applications where these kinetic parameters are unknown and difficult to measure, such as the marine subsurface, or when ecosystems undergo large-scale environmental perturbations resulting in shifts in the dominant organisms.