• Our model simulates human memory by the proposed memory network. • Our model outperforms the traditional deep knowledge tracing models. • Our model finds a more logical correlation between skills. Knowledge Tracing (KT) is a task to acquire students’ mastery level of skills based on their performance in learning process. The existing KT models have gradually achieved improvements in prediction performance. However, they do not well simulate working memory and long-term memory in human memory mechanism, which is closely related to learning process. In our paper, we propose a Hierarchical Memory Network (HMN) to fit human memory mechanism better in KT. The hierarchical memory, an essential component of HMN, is achieved by an external memory matrix and two mechanisms (divide mechanism, decay mechanism). The matrix simulates working memory by working storage and long-term memory by long-term storage through divide mechanism. Furthermore, the working storage can be changed directly, while the long-term storage is changed according to decay rates obtained from decay mechanism. Experiments demonstrate that our model outperforms several classical models in four public datasets.