A novel cogeneration system based on a wall mounted gas boiler and an organic Rankine cycle with a hydrogen production unit is proposed and assessed based on energy and exergy analyses. The system is proposed in order to have cogenerational functionality and assessed for the first time. A theoretical research approach is used. The results indicate that the most appropriate organic working fluids for the organic Rankine cycle are HFE700 and isopentane. Utilizing these working fluids increases the energy efficiency of the integrated wall mounted gas boiler and organic Rankine cycle system by about 1% and the organic Rankine cycle net power output about 0.238 kW compared to when the systems are separate. Furthermore, increasing the turbine inlet pressure causes the net power output, the organic Rankine cycle energy and exergy efficiencies, and the cogeneration system exergy efficiency to rise. The organic Rankine cycle turbine inlet pressure has a negligible effect on the organic Rankine cycle mass flow rate. Increasing the pinch point temperature decreases the organic Rankine cycle turbine net output power. Finally, increasing the turbine inlet pressure causes the hydrogen production rate to increase; the highest and lowest hydrogen production rates are observed for the working fluids for HFE7000 and isobutane, respectively. Increasing the pinch point temperature decreases the hydrogen production rate. In the cogeneration system, the highest exergy destruction rate is exhibited by the wall mounted gas boiler, followed by the organic Rankine cycle evaporator, the organic Rankine cycle turbine, the organic Rankine cycle condenser, the proton exchange membrane electrolyzer, and the organic Rankine cycle pump, respectively.