The invention discloses a method for identifying key protein through a fruit fly optimization algorithm. The method includes the steps that a protein-protein interaction network is converted into an undirected graph, a dynamic protein-protein interaction network is constructed, the edges and nodes of the dynamic protein-protein interaction network are preprocessed, the position of a fruit fly group is randomly initialized, the food random direction and distance are searched for with the sense of smell, the taste concentration judgment value of each fruit fly individual is calculated, the odorconcentration value of each fruit fly individual is calculated, the highest odor concentration value in the current group is worked out, the fruit flies fly to the food with the sense of sight, and key protein is generated. By means of the method, the key protein can be accurately identified; the simulation experiment result shows that the method has good performance indexes including sensitivity,specificity, positive predictive value, negative predictive value, accuracy rate and recall rate harmonic value, precise value and the like; compared with other methods for identifying key protein, the method adopting the fruit fly optimization algorithm for identifying the key protein has certain advantages.