Effect of reaction variables of in situ transesterification on the biodiesel production, and the characteristic differences of biodiesel obtained from aerobic granular sludge (AG) and algae-bacteria granular consortia (AAG) were investigated. The results indicated that the effect of variables on the biodiesel yield decreased in the order of methanol quantity > catalyst concentration > reaction time, yet the parameters change will not significantly affect biodiesel properties. The maximum biodiesel yield of AAG was 66.21 ± 1.08 mg/g SS, what is significant higher than that of AG (35.44 ± 0.92 mg/g SS). Although methyl palmitate was the dominated composition of biodiesel obtained from both granules, poly-unsaturated fatty acid in the AAG showed a higher percentage (21.86%) than AG (1.2%) due to Scenedesmus addition. Further, microbial analysis confirmed that the composition of biodiesel obtained from microbial granules was also determined by bacterial community, and Xanthomonadaceae and Rhodobacteraceae were the dominant bacteria of AG and AAG, respectively.