The invention relates to a bacillus megaterium bacterial fertilizer for onsite fermentation in a farm and applications thereof. The bacterial fertilizer comprises the following raw materials: bacillus megaterium powder, colistin sulfate, natamycin, inosine, lysine, corn flour, soybean cake powder, disodium hydrogen phosphate, potassium chloride, and brown sugar. The bacillus megaterium bacterial fertilizer can be applied to onsite fermentation and propagation in a farm. The colistin sulfate and natamycin in the bacterial fertilizer can inhibit the growth of fungi (such as pathogenic fungi, yeast, etc.) and gram negative bacteria (such as colibacillus, salmonella, etc.) during the fermentation process. The spore germinator (inosine and lysine) can rapidly promote the germination of spores of bacillus megaterium and improve the germination rate of spores. The provided preparation can be applied to the onsite fermentation and propagation in a simple and crude farm. The required equipment is simple. The using amount of bacterium is little. The cost is low. The fermentation broth obtained through onsite fermentation has the advantages of high content, good activity and few contaminating microorganisms. The bacterial fertilizer can decompose phosphorus, prevent disease, promote growth, increase output, and improve product quality. The effect is stable.