Black soldier fly (Hermetia illucens) larvae (BSFL) act as a biological system converting organic waste into protein and fat with great potential application as pet food. To evaluate the feasibility of BSFL as a protein and fat source, 20 healthy beagle dogs were fed three dietary treatments for 65 days, including (1) a basal diet group (CON group), (2) a basal diet that replaced 20% chicken meal with defatted black soldier fly larvae protein group (DBP group), and (3) a basal diet that replaced 8% mixed oil with black soldier fly larvae fat group (BF group). This study demonstrated that the serum biochemical parameters among the three groups were within the normal range. No difference (p > 0.05) was observed in body weight, body condition score, or antioxidant capacity among the three groups. The mean IFN-γ level in the BF group was lower than that in the CON group, but there was no significant difference (p > 0.05). Compared with the CON group, the DBP group had decreasing (p < 0.05) apparent crude protein and organic matter digestibility. Furthermore, the DBP group had decreasing (p < 0.05) fecal propionate, butyrate, total short-chain fatty acids (SCFAs), isobutyrate, isovalerate, and total branched-chain fatty acids (BCFAs) and increased (p < 0.05) fecal pH. Nevertheless, there was no difference (p > 0.05) in SCFAs or BCFAs between the CON and BF groups. The fecal microbiota revealed that Lachnoclostridium, Clostridioides, Blautia, and Enterococcus were significantly enriched in the DBP group, and Terrisporobacter and Ralstonia were significantly enriched in the BF group. The fecal metabolome showed that the DBP group significantly influenced 18 metabolic pathways. Integrating biological and statistical correlation analysis on differential fecal microbiota and metabolites between the CON and DBP groups found that Lachnoclostridium, Clostridioides, and Enterococcus were positively associated with biotin. In addition, Lachnoclostridium, Clostridioides, Blautia, and Enterococcus were positively associated with niacinamide, phenylalanine acid, fumaric acid, and citrulline and negatively associated with cadavrine, putrescine, saccharopine, and butyrate. In all, 20% DBP restrained the apparent CP and OM digestibility, thereby affecting hindgut microbial metabolism. In contrast, 8% BF in the dog diet showed no adverse effects on body condition, apparent nutrient digestibility, fecal microbiota, or metabolic profiles. Our findings are conducive to opening a new avenue for the exploitation of DBP and BF as protein and fat resources in dog food.