Mallory bodies are detected through liver biopsy and histological examination. Under a microscope, they appear as eosinophilic, ropy inclusions within hepatocytes. Staining techniques, such as hematoxylin and eosin (H&E) staining, are commonly used to visualize these inclusions. The identification of Mallory bodies assists pathologists in diagnosing liver conditions and assessing the extent of liver damage due to toxic exposure.