Artificial photosynthesis, the biomimetic approach to converting sunlight's energy directly into chemical fuels, aims to imitate nature by using an integrated system of nanostructures, each of which plays a specific role in the sunlight-to-fuel conversion process. Here we describe a fully integrated system of nanoscale photoelectrodes assembled from inorganic nanowires for direct solar water splitting. Similar to the photosynthetic system in a chloroplast, the artificial photosynthetic system comprises two semiconductor light absorbers with large surface area, an interfacial layer for charge transport, and spatially separated cocatalysts to facilitate the water reduction and oxidation. Under simulated sunlight, a 0.12% solar-to-fuel conversion efficiency is achieved, which is comparable to that of natural photosynthesis. The result demonstrates the possibility of integrating material components into a functional system that mimics the nanoscopic integration in chloroplasts. It also provides a conceptual blueprint of modular design that allows incorporation of newly discovered components for improved performance.