A four-component synthesis of 2-phenyl-9H-pyrimido[4,5-b]indoles was developed using indole-3-carboxaldehydes, aromatic aldehyde and ammonium iodide as the raw materials under transition-metal-free conditions. The pyrimidine ring was formed in one pot through [4 2] annulation reaction. Four C–N bonds were formed in one pot promoted by iodine and iodide additives. This work is highlighted by using two ammonium iodides as the sole nitrogen source.