Wastewater treatment plants (WWTP) are considered an important source of offensive odors, which are caused mainly by hydrogen sulfide, ammonia, and volatile organic compounds. For the elimination of these pollutants, biofiltration offers an economical alternative of high efficiency and low waste generation. The main factors that affect the performance of a biofilter are the characteristics of the packing material, pH, moisture, concentration of pollutants, and residence time of the gas in the bed. These parameters must be optimized to improve the performance of the biofilter. The purpose of this work was to evaluate the removal efficiency of H2S and NH3 with biofilters packed with compost mixtures made from chicken manure and lignocellulosic residues (pruning waste, sugarcane bagasse, and rice husk) under different residence time (60, 45, 33, 25, and 18 s at 40% moisture) and at two levels of pollutant concentration (52 mg H2S/m3 and 2 mg NH3/m3 and high: 260 mg H2S/m3 and 10 mg NH3/m3). At 60 s, all biofilters had high removal efficiency (higher than 90%) at the two evaluated gas concentrations. The maximum elimination capacity was reached at 25 s, with a removal efficiency of 80% for both gases at the highest concentration. Also, the effect of moisture content over removal efficiency was evaluated at 25 s. When moisture was 30%, the biofilter of compost from manure and pruning waste decreased its efficiency below 80%; on the other hand, the biofilters with the compost of manure and the two other lignocellulosic residues (sugarcane bagasse and rice husk) reduced their efficiency considerably when the moisture content was 20%. The results showed that the highest removal efficiency was obtained at a residence time of 25 s and a bed moisture content of 40% for the three types of compost mixtures evaluated. These results suggest that the moisture content of the packing material has a significant influence on the elimination of contaminants that are soluble in water. These results are valuable to scale up this kind of biotechnologies in real applications.