Community detection for directed networks is an important topic in network science. Thus, this study proposes a semi-supervised community detection algorithm for directed networks based on non-negative matrix factorization (NMF). First, prior information is adopted to reconstruct the adjacency matrix and then penalize the community membership of nodes. Meanwhile, the influence of node degree heterogeneity is eliminated by row normalization, and finally, the objective function is solved using alternating iterative updates. Comparative experiments on real network datasets demonstrate the effectiveness of the proposed algorithm. Compared to existing NMF-based methods, this method can significantly improve community detection accuracy.