The objective of this study was to determine the effect of Trachyspermum ammi (T. ammi) on the liver of streptozotocin (STZ)-induced diabetic rats. This study began by identifying the methanolic composition of T. ammi. The presence of three compounds was determined using gas chromatography-mass spectrometry (GC-MS), with Thymol (60.705%), ϒ-Terpinene (22.216%), and P-cymene (17.078%) being the most prevalent. Afterwards, diabetic rats were treated with T. ammi (200–500 mg/kg) or losartan (20 mg/kg) daily for 60 days. In the diabetic rats treated with T. ammi, levels of hepatic indicators, lipid peroxidation markers, and proinflammatory mediators decreased significantly. In the liver of T. ammi-treated diabetic rats, glutathione-S-transferase (GST), catalase (CAT), and glutathione (GSH) increased significantly. Despite the fact that proinflammatory cytokine levels were significantly increased, interleukin-1β (IL-1β) and tumor necrosis factor-alpha (TNF-α) levels decreased in the groups administered the extract. From these results, it can be concluded that T. ammi significantly restored the liver’s antioxidant balance and inflammation caused by hyperglycemia.