Ammonia (NH3) is an important commodity chemical used as an agricultural fertilizer and hydrogen-storage material. There has recently been much interest in developing an environmentally benign process for NH3 synthesis. Here, we report enhanced production of ammonia from diazotrophs under light irradiation using hybrid composites of inorganic nanoparticles (NPs) and bacterial cells. The primary focus of this study lies in the intracellular biosynthesis of semiconductor NPs within Azotobacter vinelandii, a diazotroph, when bacterial cells are cultured in a medium containing precursor molecules. For example, enzymes in bacterial cells, such as cysteine desulfurase, convert cysteine (Cys) into precursors for cadmium sulfide (CdS) synthesis when supplied with CdCl2. Photoexcited charge carriers in the biosynthesized NPs are transferred to nitrogen fixation enzymes, e.g., nitrogenase, facilitating the production of ammonium ions. Notably, the intracellular biosynthesis approach minimizes cell toxicity compared to extracellular synthesis due to the diminished generation of reactive oxygen species. The biohybrid system based on the in vivo approach results in a fivefold increase in ammonia production (0.45 mg gDCW-1 h-1) compared to the case of diazotroph cells only (0.09 mg gDCW-1 h-1).