In this study, to compensate voltage unbalance and harmonics and improve load sharing, a distributed hierarchical control scheme is proposed for islanded microgrids. In the proposed scheme, a method is proposed, which can improve the voltage quality of sensitive load bus by determining the amount of effort made by each distributed generation (DG) and taking their rated power constraints into account for compensation. Moreover, this method is capable of improving the load sharing among DG units adaptively using circulating currents rule. Compared to the previous proposed methods, the method proposed in this study does not need a central controller, and communication is only needed between adjacent DG units. Furthermore, in this scheme, the contribution of each DG unit in compensation will be in proportion to its rated power, and none of them will be overloaded. Also, to compensate the error of load current sharing components, there is no need to have any information about impedance of DGs feeders and load type. To show the efficiency of the proposed scheme, simulation studies are performed on a typical islanded microgrid in MATLAB/Simulink environment.