Esbriet (pirfenidone) is used to treat adults with idiopathic pulmonary fibrosis (IPF), a lung condition that causes inflammation and scarring. Esbriet works by slowing the buildup of scar tissue in the lungs, though its exact mechanism is not fully understood. It has anti-inflammatory, antioxidant, and anti-fibrotic properties.