One-pot synthesis of urea [(NH 2 ) 2 CO] from easily available small molecules, that is, N 2 , CO 2 , and H 2 O, is an extremely attractive but very challenging reaction. 2D-CdS@3D-BiOBr composites with S-scheme heterojunctions are constructed via a facile hydrothermal technique followed by a self-assembly method and shown to be an excellent photocatalyst enabling the reduction of N 2 and CO 2 with H 2 O to (NH 2 ) 2 CO under visible light. The optimal 40%2D-CdS@3D-BiOBr sample shows up to 15 μmol•g −1 •h −1 total yield of NH 3 and (NH 2 ) 2 CO, of which (NH 2 ) 2 CO accounts for 54%. The apparent quantum efficiency (AQE) is 3.93% for urea production. On the photocatalyst, urea is speculated to form by two possible chemical routes. One is direct photocatalytic synthesis. Both N 2 and CO 2 molecules are activated by the Cd 2+ ion of 2D-CdS and the oxygen defect of 3D-BiOBr at the edges of the heterojunction interface of 2D-CdS/3D-BiOBr, respectively. *HNCONH* is the key intermediate of the formation of (NH 2 ) 2 CO molecules. The other is indirect synthesis by photocatalysis and then thermocatalysis. N 2 is reduced into NH 3 and CO 2 is reduced into CO on 2D-CdS by the photogenerated electrons and protons, and then the formed NH 3 reacts with the reactant CO 2 or the product CO to form (NH 2 ) 2 CO by thermocatalysis on 2D-CdS. The former is dominant for urea synthesis. The work confirms that urea could be synthesized photocatalytically from cheap N 2 , CO 2 , and H 2 O under visible light. A composite heterojunction semiconductor could be a prospective photocatalyst appropriate for the complex reaction.