Most of the existing network embedding methods only preserve the local structure information of the network, while they ignore other potential information in the network. In order to preserve the community information of the network and reflect the multi-granularity characteristics of the network community structure, a network Embedding method based on Multi-Granularity Community information (EMGC) was proposed. Firstly, the network’s multi-granularity community structure was obtained, the node embedding and the community embedding were initialized. Then, according to the node embedding at previous level of granularity and the community structure at this level of granularity, the community embedding was updated, and the corresponding node embedding was adjusted. Finally, the node embeddings under different community granularities were spliced to obtain the network embedding that fused the community information of different granularities. Experiments on four real network datasets were carried out. Compared with the methods that do not consider community information (DeepWalk, node2vec) and the methods that consider single-granularity community information (ComE, GEMSEC), EMGC’s AUC value on link prediction and F1 score on node classification are generally better than those of the comparison methods. The experimental results show that EMGC can effectively improve the accuracy of subsequent link prediction and node classification.