Pyrazinamide is metabolized in the liver primarily by microsomal deamidation to pyrazinoic acid, which is then hydroxylated to form 5-hydroxypyrazinoic acid. Both the parent compound and its metabolites are excreted by the kidneys. Impairment in hepatic or renal function can affect the drug's clearance and increase the risk of toxicity.