The recent revolution in shale gas has presented opportunities for distributed manufacturing of key commodity chemicals, such as methanol, from methane. However, the conventional methane-to-methanol process is energy intensive which negatively affects the profitability and sustainability. We report an intensified process configuration that is both economically attractive and environmentally sustainable. This flowsheet is systematically discovered using the building block-based representation and optimization methodology. The new process configuration utilizes membrane-assisted reactive separations and can have as much as 190% higher total annual profit compared to a conventional configuration. Additionally, it has 57% less CO2-equivalent greenhouse gas (GHG) emission. Such drastic improvement highlights the advantages of building block-based computer-aided process intensification method.