ABSTRACT Objective Keystone species are required for the integrity and stability of an ecological community, and therefore, are potential intervention targets for microbiome related diseases. Design Here we describe an algorithm for the identification of keystone species from cross-sectional microbiome data of non-alcoholic fatty liver disease (NAFLD) based on causal inference theories and dynamic intervention modeling (DIM). Results Eight keystone species in the gut of NAFLD, represented by P. loveana , A. indistinctus and D. pneumosintes , were identified by our algorithm, which could efficiently restore the microbial composition of the NAFLD toward a normal gut microbiome with 92.3% recovery. These keystone species regulate intestinal amino acids metabolism and acid-base environment to promote the growth of the butyrate-producing Lachnospiraceae and Ruminococcaceae species. Conclusion Our method may benefit microbiome studies in the broad fields of medicine, environmental science and microbiology. SUMMARY What is already known about this subject? Non-alcoholic fatty liver disease (NAFLD) is a complex multifactorial disease whose pathogenesis remains unclear. Dysbiosis in the gut microbiota affects the initiation and development of NAFLD, but the mechanisms is yet to be established. Keystone species represent excellent candidate targets for gut microbiome-based interventions, as they are defined as the species required for the integrity and stability of the ecological system. What are the new findings? NAFLD showed significant dysbiosis in butyrate-producing Lachnospiraceae and Ruminococcaceae species. Microbial interaction networks were constructed by the novel algorithm with causal inference. Keystone species were identified form microbial interaction networks through dynamic intervention modeling based on generalized Lotka-Volterra model. Eight keystone species of NAFLD with the highest potential for restoring the microbial composition were identified. How might it impact on clinical practice in the foreseeable future? An algorithm for the identification of keystone species from cross-sectional microbiome data based on causal inference theories and dynamic intervention modeling. Eight keystone species in the gut of NAFLD, represented by P. loveana , A. indistinctus and D. pneumosintes , which could efficiently restore the microbial composition of the NAFLD toward a normal gut microbiome. Our method may benefit microbiome studies in the broad fields of medicine, environmental science and microbiology.