To investigate the effects of inoculants and environmental temperature on fermentation quality and bacterial diversity of alfalfa silage, first-cut alfalfa was ensiled with or without two screened lactic acid bacteria (LAB) strains, Lactobacillus plantarum, LP, and Lactobacillus casei, LC. Each treatment was divided into three parts and stored at 20°C, 30°C, 40°C, respectively. After 60 days ensiling, fermentation characteristics were measured and bacterial diversity was investigated by 16S ribosomal RNA gene sequencing using Illumina MiSeq platform. LP and LC decreased pH, coliform bacteria counts and increased lactic acid content at 20°C, and the two strains decreased pH, ammonia-N concentration, coliform bacteria counts at 30°C. When the environmental temperature was 40°C, silage treated with LC showed lower LAB and coliform bacteria counts and higher lactic acid content than the untreated and LP treated silages. Butyric acid mainly appeared in silages stored at 40°C. The relative abundance of Lactobacillus in alfalfa silages stored at 20°C and 30°C was highest and increased after LP and LC were added. Garciella was another dominant genus in silages stored at 40°C. In conclusion, LP and LC improved fermentation quality of alfalfa silage by increasing Lactobacillus proportions at 20°C and 30°C; ensiling alfalfa at 40°C was difficult because of Garciella.