Link prediction aims to predict the missing facts in knowledge graphs. Most previous work focuses on the transductive link prediction, which cannot predict unknown entities. However, knowledge graphs are evolving in practical scenarios and new entities are constantly added. A graph neural network based on subgraph structure can effectively make predictions on a knowledge graph composed of unknown entities. Based on this method, we propose a new inductive link prediction model MILP, which uses metalearning to predict unseen entities on few-shot data. Specifically, MILP divides the training data into four tasks according to the relation types and constructs a subgraph structure of each triplet, and then trains each task sequentially through the meta-learning framework which uses graph neural network to score the triplets. Experiments are carried out on the benchmark inductive link prediction datasets, and the results show that in most cases the proposed model achieves better results than the baseline models, proving the effectiveness of MILP.