Energy and exergy analyses of an integrated system based on anaerobic digestion (AD) of sewage sludge from wastewater treatment plant (WWTP) for multi-generation are investigated in this study. The multigeneration system is operated by the biogas produced from digestion process. The useful outputs of this system are power, freshwater, heat, and hydrogen while there are some heat recoveries within the system for improving efficiency. An open-air Brayton cycle, as well as organic Rankine cycle (ORC) with R-245fa as working fluid, are employed for power generation. Also, desalination is performed using the waste heat of power generation unit through a parallel/cross multi-effect desalination (MED) system for water purification. Moreover, a proton exchange membrane (PEM) electrolyzer is used for electrochemical hydrogen production option in the case of excess electricity generation. The heating process is performed via the rejected heat of the ORC's working fluid. The production rates for products including the power, freshwater, hydrogen, and hot water are obtained as 1102 kW, 0.94 kg/s, 0.347 kg/h, and 1.82 kg/s, respectively, in the base case conditions. Besides, the overall energy and exergy efficiencies of 63.6% and 40% are obtained for the developed system, respectively.