Kirsten rat sarcoma viral oncogene homolog (KRAS), or guanosine triphosphatase KRAS, is a proto-oncogene that encodes the small guanosine triphosphatase transductor protein. Previous studies have found that KRAS can promote cytokine secretion, cell chemotaxis, and survival. However, its effects on milk fat synthesis in bovine mammary epithelial cells are unclear. In this study, the effects of KRAS inhibition on cell metabolism, autophagy, oxidative stress, endoplasmic reticulum stress, mitochondrial function, and lipid composition as well as the potential mechanisms were detected in an immortalized dairy cow mammary epithelial cell line (MAC-T). The results showed that inhibition of KRAS changed the lipid composition (especially the triglyceride level), mitochondrial functions, autophagy, and endoplasmic reticulum stress in cells. Moreover, KRAS inhibition regulated the levels of the mammalian target of rapamycin and mitogen-activated protein kinase (extracellular regulated protein kinases, c-Jun N-terminal kinases, p38) activation. These results indicated that regulation of KRAS would affect the synthesis and composition of milk fat. These results are also helpful for exploring the synthesis and secretion of milk fat at the molecular level and provide a theoretical basis for improving the percentage of fat in milk and the yield of milk from cows.