The invention discloses a method for identifying key proteins with an AFSO (artificial fish school optimization) algorithm. The method comprises steps as follows: a protein-protein interaction networkis converted into an undirected graph, a purified protein-protein interaction network is constructed, RNA gene expression values corresponding to proteins, GO comment information and degrees of proteins in known compounds are obtained, edges and nodes of the purified protein-protein interaction network are treated, known key proteins are selected as initial artificial fishes, the artificial fishes execute foraging behavior, random behavior, following behavior and swarm behavior, and the key proteins are produced. According to the method, the key proteins can be identified accurately; a simulation experiment result indicates that performance of indexes such as sensitiveness, specificity, a positive predictive value, a negative predictive value and the like is better; compared with other methods for identifying the key proteins, the method has the advantages that optimizing characteristics of artificial fish schools are combined with topological characteristics of the protein-protein interaction network to realize the key protein identification process, and the accuracy rate of the key protein identification is increased.