To improve the economy benefit of energy optimal dispatching of islanded microgrid (MG) and the ability to deal with the uncertainty of load, the day-ahead optimal dispatching based on improved symbiotic organisms search (ISOS) and the real-time optimal dispatching based on real-time dynamic adjustment strategy (RTDAS) is proposed. The structure of islanded MG based on multi-agent system introduces consumption resistors (CR) to consume excess energy in real-time dispatching. The introduction of recombination and mutation phase in ISOS is to improve the global search ability to obtain better day-ahead optimal dispatching results. Then the RTDAS in real-time optimal dispatching adjusts the power output of batter energy storage system (BESS), micro-turbine (MT) and CR to deal with the fluctuation of actual load. To improve the solving speed of real-time optimal dispatching, the models of BESS and MT are linearized. Simulation shows that the day-ahead optimal dispatching results based on ISOS are better than that based on SOS and the real-time optimal dispatching based on RTDAS can quickly complete the real-time power output adjustment of BESS, MT and CR in about 1 s time. Moreover, the results of real-time optimal dispatching with linearization model of BESS and MT are better than those without linearization.