Scytonemin is an indolic–phenolic natural product with potent pharmaceutical activities and possible application as a sunscreen. However, the productivity of the existing synthesis systems restrains its applications in medicine and cosmetics. In this paper, we report the generation of the monomer moiety of scytonemin from tryptophan and tyrosine in Escherichia coli. We heterologously expressed the biosynthetic pathway from Nostoc punctiforme and discovered that only three enzymes from N. punctiforme are required for the in vivo production of the monomer moiety of scytonemin in E. coli. We also found that the constructed recombinant E. coli strains are capable of producing novel alkaloids as shunt products. The recombinant E. coli strain expressing the putative scytonemin biosynthetic gene cluster produced 4.2 mg L−1 (2.46 μg mg−1 dry cell weight) of the monomer moiety of scytonemin without supplementation of extracellular substrates whereas upon supplementation with 1 mM of the substrates to the E. coli strain harboring scyABC genes, 8.9 mg L−1 (4.56 μg mg−1 dry cell weight) of the monomer moiety of scytonemin was produced in 5 days. Combining this cell factory with the previously described chemical dimerization process will contribute to a sustainable production of semi-synthetic scytonemin.