Gene regulatory network (GRN) inference is an important problem in bioinformatics. Many machine learning methods have been applied to increase the inference accuracy. Ensemble learning methods are shown in DREAM3 and DREAM5 challenges to yield a higher inference accuracy than individual algorithms. However, no ensemble method has been proposed to take advantage of the complementarity among existing algorithms from the perspective of network motifs. We propose an ensemble method based on the principle of Mixture-of-Experts ensemble learning. The method can quantitatively evaluate the accuracy of individual algorithms on predicting each type of the network motifs and assign weights to the algorithms accordingly. The individual predictions are then used to generate the ensemble prediction. By performing controlled experiments and statistical tests, the proposed ensemble method is shown to yield a significantly higher accuracy than the generic average ranking method used in the DREAM5 challenge. In addition, a new type of network motif is found in GRN, the inclusion of which can increase the accuracy of the proposed method significantly.