Cyanobacteria, which perform oxygenic photosynthesis, have drawn attention as hosts for the direct production of biofuels and commodity chemicals from CO2 and H2O using light energy. Although cyanobacteria capable of producing diverse chemicals have been generated by metabolic engineering, anaerobic non-photosynthetic culture conditions are often necessary for their production. In this study, we conducted cell type-specific metabolic engineering of the filamentous cyanobacterium Anabaena sp. PCC 7120, which forms a terminally differentiated cell called a heterocyst with a semi-regular spacing of 10–15 cells. Because heterocysts are specialized cells for nitrogen fixation, the intracellular oxygen level of heterocysts is maintained very low even when adjacent cells perform oxygenic photosynthesis. Pyruvate decarboxylase of Zymomonas mobilis and alcohol dehydrogenase of Synechocystis sp. PCC 6803 were exclusively expressed in heterocysts. Ethanol production was concomitant with nitrogen fixation in genetically engineered Anabaena sp. PCC 7120. Engineering of carbon metabolism in heterocysts improved ethanol production, and strain ET14, with an extra copy of the invB gene expressed from a heterocyst-specific promoter, produced 130.9 mg L−1 of ethanol after 9 days. ET14 produced 1681.9 mg L−1 of ethanol by increasing the CO2 supply. Ethanol production per heterocyst cell was approximately threefold higher than that per cell of unicellular cyanobacterium. This study demonstrates the potential of heterocysts for anaerobic production of biofuels and commodity chemicals under oxygenic photosynthetic conditions.