Prior studies have suggested close associations between miRNAs and diseases. Correct prediction of potential miRNA-disease pairs by computational methods is able to greatly accelerate the experimental process in biomedical research. However, many methods cannot effectively learn the complex information in the multi-source data, and limits the performance of the prediction model. A heterogeneous network prediction model MEAHNE is proposed to make full use of the complex information in multi-source data. We first constructed a heterogeneous network using miRNA-disease associations, miRNA-gene associations, disease-gene associations, and gene-gene associations. Because the rich semantic information in the heterogeneous network contains a lot of relational information of the network. To mine the relational information in heterogeneous network, we use neural networks to extract semantic information in metapath instances. We encode the obtained semantic information into weights using the attention mechanism, and use the weights to aggregate nodes in the network. At the same time, we also aggregate the semantic information in the metapath instances into the nodes associated with the instances, which can make the node embedding have excellent ability to represent the network. MEAHNE optimizes parameters through end-to-end training. MEAHNE is compared with other state-of-the-art heterogeneous graph neural network methods. The values of area under precision-recall curve and receiver operating characteristic curve show the superiority of MEAHNE. Additionally, MEAHNE predicted 50 miRNAs for lung cancer and esophageal cancer each and verified 49 miRNAs associated with lung cancer and 44 miRNAs associated with esophageal cancer by consulting relevant databases. MEAHNE has good performance and interpretability by experimental verification.