The effect of ammonia pretreatment on the anaerobic digestion performance of rice straw was investigated. The rice straw was pretreated with four different moisture contents (30%, 50%, 70%, and 90%) and three concentrations of ammonia (2%, 4%, and 6%). The results showed that the anaerobic digestion achieved best performance for the rice straw pretreated by ammonia concentration of 4% and moisture content of 70%, and biogas yield achieved the highest value (396.92 mL·g -1 total solid), which was 21.9% higher than that of the untreated rice straw. Higher moisture was recommended as it could increase system stability, shorten anaerobic digestion time, and increase biogas production. The composition analyses indicated that ammonia pretreatment could effectively destroy the chemical structure of lignocellulose, and partially decompose cellulose, hemicellulose, and lignin. Cellulose and hemicellulose were converted by 79.2% and 63.2%, respectively, at optimal ammonia amount and moisture content. The ammonia pretreatment proved to be a simple and effective methods to improve the anaerobic digestion performance of rice straw.