This study focuses on optimum operating conditions for thermally coupled two-membrane reactor (TCTMR) to maximize ultrapure hydrogen and methanol production as alternative environmentally friendly fuels. Hydrogen is used in chemical and petrochemical industries especially applicable in fuel cell technologies, with zero CO2 emission. In the proposed configuration, methanol synthesis is carried out in the exothermic side by hydroxy sodalite membrane and supplies the necessary heat for the endothermic side. Dehydrogenation of cyclohexane is carried out in the endothermic side with hydrogen-permselective Pd/Ag membrane wall. A one-dimensional, steady-state heterogeneous model and the differential evolution method, as a strong and powerful optimization method, are applied to simulate and optimize the proposed reactor configuration. The simulation results have been shown that there are optimal values of the initial molar flow rate of endothermic, outer and the inner permeation stream, inlet temperature of exothermic, endothermic, outer and inner permeation sides and inlet pressure of inner permeation side to maximize the objective function. The optimization results show 5.87 and 10.51% increase in the methanol production in optimized TCTMR compared with TCTMR and a conventional reactor, respectively. Moreover, this novel configuration with optimal conditions raises the hydrogen production rate about 1.1847 ton/day. Copyright © 2012 John Wiley & Sons, Ltd.