Microgrids (MGs) are often unbalanced due to the integration of single-phase generators, unbalanced loads and asymmetrical faults. To better analyze such a MG, this paper presents an approach to analyze the transient response for an inverter-based MG under unbalanced condition. The dynamic phasor (DP) concept is used for the MG modeling under stationary abc reference frame. First, the DP model of the inverter-based DG is developed. The influence of unbalanced conditions on the inverter including oscillations on dc side are considered in this paper. Then, the model of the network and loads is developed. Finally, all the sub-modules are combined on a time-variable system frequency to obtain the complete DP model of unbalanced MG. To validate the proposed approach, the DP method is applied to a MG test system with three-phase and single-phase DGs. Small signal analysis is carried out to derive the dominant modes and their influence on the system response. Simulation results from the DP model are compared against the detailed model built in MATLAB/SimPowerSystem. The results from load disturbances and asymmetrical faults are used to verify the DP model.