The purpose of this study was to compare and analyze the pattern of energy consumption and greenhouse gases emission in different sizes of walnut orchards in Ilam region. The average of total energy requirement was estimated to be 65334.82 MJ/ha. Diesel fuel, irrigation water and machinery with 57.4, 12.55 and 10.65 percent, respectively, were the most consumed energy inputs in walnut production. Energy efficiency and productivity weres estimated to be 1.05 and 0.04 kg per MJ, respectively. The amount of greenhouse gas emissions for walnut production was calculated as 2496.5 kg of CO2 per hectare. The three inputs of diesel fuel, animal manure and nitrogen fertilizer with 73.62%, 16.82% and 2.92%, had the highest environmental pollution in walnut production. Positive regression coefficients were obtained from the Cobb-Douglas function for human labor inputs, machinery, diesel fuel, chemical pesticides and the regression coefficients of chemical fertilizer and irrigation inputs were negative. The results of econometric estimation and sensitivity analysis of walnut production inputs showed that by increasing one megajoule per hectare in energy inputs of human labor, machinery, diesel fuel, chemical fertilizer, animal manure, irrigation, chemical pesticides, electricity and pruning, yield increases by 26%, 03%, 001%, 004%, 36%, 2.78% and 0.16 kg/ha respectively.