Our findings revealed that ERN1 and SLC11A1 serve as key regulatory molecules in NAFLD, with significant associations with characteristic features of the hepatic immune microenvironment. This evidence concerns the gene ERN1 and metabolic dysfunction-associated steatotic liver disease.