Constructing junctions between semiconductors is an effective way to promote charge separation and thus to improve the photoelectrochemical and photocatalytic H2 generation, and specifically, p-n homojunction is considered as a very promising structure. Herein, we fabricate TiO2 p-n homojunction by in-situ decorating n-type oxygen-defected TiO2 QDs on p-type titanium-defected TiO2 surface. The composite structure and O-/Ti-vacancies are testified by TEM, XRD, XPS, EPR and UV–vis DRS characterizations. The “V-shaped” Mott-Schottky plot and anodic shift of onset potential in I-V curves verify the characteristics of p-n homojunction. PL and EIS analyses indicate p-n homojunction is much more efficient in charge separation and transfer than p-type, n-type and n-n type-II homojunction, subsequently leading to the significantly high photoactivity. Compared with p-TiO2, p-n homojunction TiO2 possesses 5-fold and 1.7-fold higher performances in photoelectrochemical and photocatalytic hydrogen generation, respectively. This work provides new opportunities to design and fabricate highly efficient TiO2 photocathodes for hydrogen generation.