This study addresses the pressing environmental concerns associated with the rapidly growing distillery industry, which is a significant contributor to wastewater generation. By focusing on the treatment of distillery wastewater using anaerobic digestion, this research explores the potential to convert organic materials into biofuels (methane). Moreover, the study aims to recover both methane and phosphorus from distillery wastewater in a single anaerobic reactor, which represents a novel and unexplored approach. Laboratory-scale experiments were conducted using mesophilic and thermophilic upflow anaerobic sludge blanket reactors. A key aspect of the study involved the implementation of a unique strategy: the mixing of centrate and spent caustic wastewater streams. This approach was intended to enhance treatment performance, manipulate the microbial community structure, and thereby optimizing the overall treatment performance. The integration of the centrate and spent caustic streams yielded remarkable co-benefits, resulting in significant biomethane production and efficient phosphorus precipitation. The study demonstrated a phosphorus removal efficiency of ∼60 % throughout the 130–140 days operation period. The recovery of phosphorus via the reactor sludge offers exciting opportunities for its utilization as a fertilizer or as a raw material within the phosphorus refinery industry. The biomethane produced during the treatment exhibits significant energy potential, estimated at 0.5 GJ/(m3 distillery wastewater).