Metarhizium rileyi is a filamentous entomopathogenic fungus that is highly pathogenic to lepidopteran insects. In our study, we constructed an Agrobacterium tumefaciens-mediated transgene system using the hygromycin resistance gene (Hyg R) as a selection marker in M. rileyi through homologous recombination. Binary knockout vectors for two genes (NOR_03501, longevity assurance gene, and NOR_03153, ATP-binding domain protein domain gene) in the M. rileyi strain SZCY201010 were successfully developed. We compared the genetic transformation efficiency using five kinds of asexual spores. The initial genetic transformation rates using a competent blastospore for NOR_03501 and NOR_03153 were 54.35 and 47.19%, respectively. Subsequently, both genes were successfully knocked out, and the transformed fungi were verified by PCR, RT-qPCR, and green fluorescent protein labeling. The biological phenotypes of the two genes were analyzed. The NOR_03501 gene plays a crucial role in carbon source utilization, stress resistance, and cuticle infection of fungal mycelium growth, while the NOR_03153 gene is significant for conidial production, stress resistance, and body wall infection. This study provides a promising tool for gene manipulation in M. rileyi, enhancing research in functional genomics and the exploration of fungal gene resources.