Abstract Gas-phase compost biofilters are extensively used in concentrated animal feeding operations to remove odors and, in some cases, ammonia from air sources. The expected biochemical pathway for these predominantly aerobic systems is nitrification. However, non-uniform media with low oxygen levels can shift biofilter microbial pathways to denitrification, a source of greenhouse gases. Several factors contribute to the formation of anoxic/anaerobic zones: media aging, media and particle structure, air velocity distribution, compaction, biofilm thickness, and moisture content (MC) distribution. The present work studies the effects of media moisture conditions on ammonia (NH3) removal and greenhouse gas generation (nitrous oxide, N2O and methane, CH4) for gas-phase compost biofilters subject to a 100-day controlled drying process. Continuous recordings were made for the three gases and water vapor (2.21-h sampling cycle, each cycle consisted of three gas species, and water vapor, for a total of 10,050 data points). Media moisture conditions were classified into three corresponding media drying rate (DR) stages: Constant DR (wetter media), falling DR, and stable-dry system. The first-half of the constant DR period (0–750h; MC=65–52%, w.b.) facilitated high NH3 removal rates, but higher N2O generation and no CH4 generation. At the drier stages of the constant DR (750–950h; MC=52–48%, w.b.) NH3 removal remained high but N2O net generation decreased to near zero. In the falling DR stage (1200–1480h; MC=44–13%) N2O generation decreased, CH4 increased, and NH3 was no longer removed. No ammonia removal or greenhouse gas generation was observed in the stable-dry system (1500–2500h; MC=13%). These results indicate that media should remain toward the drier region of the constant DR (in close proximity to the falling DR stage; MC=50%, approx.), to maintain high levels of NH3 removal, reduced levels of N2O generation, and nullify levels of CH4 generation.