Background: The triglyceride and glucose index (TyG) and triglyceride to high-density lipoprotein cholesterol ratio (TG/HDL-C) are substitute markers of insulin resistance (IR). In a retrospective cross-sectional study, the authors aimed to compare the efficacy of the two indicators in diagnosing metabolic-associated fatty liver disease (MAFLD) to construct a novel disease diagnosis model. Methods: Overall, 229 patients (97 MAFLD and 132 Non-MAFLD at West China Hospital of Sichuan University were included. MAFLD was diagnosed using ultrasonography. Biochemical indexes were collected and analyzed by logistic regression to screen out indicators that were expressed differently in MAFLD patients and healthy controls, which were incorporated into a diagnostic model. Results: After adjusting for age, sex, and body mass index (BMI), serum alanine transaminase (ALT), aspartate transaminase (AST), AST/ALT (A/A), fasting plasma glucose (FPG), cystatin C, uric acid, triglycerides (TG), high-density lipoprotein cholesterol (HDL-C), alkaline phosphatase (ALP), gamma-glutamyl transferase (GGT), non-HDL-C, LDL-C/HDL-C, non-HDL-C/HDL-C, TG/HDL-C, TC/HDL-C, TyG, and TyG-BMI were risk factors for MAFLD. The odds ratio of TG/HDL-C and TyG were 5.387 (95%CI: 2.986-9,718) and 107.945 (95%CI: 25.824-451.222), respectively. In identifying MAFLD, TyG, TG/HDL-C, and TG were found to be the most vital indexes based on the random forest method, with the area under the curve (AUC) greater than 0.9. In addition, the combination of gender, BMI, ALT, TG, HDL-C, TyG, and TyG-BMI had a high diagnostic efficiency for MAFLD. Conclusions: TyG and TG/HDL-C were potential risk factors for MAFLD, and the former performed better in diagnosing MAFLD. The combination of gender, BMI, ALT, TG, HDL-C, TyG, and TyG-BMI improved the diagnostic capability for MAFLD.