A unique hierarchical mesoporous SnO2 microflower was utilized for the fabrication of an immunosensor. The modified nitrogen-doped carbon quantum dots (NCQDs) improved the photoelectrochemical (PEC) activity of the SnO2, and contributed to the in situ assembly of Bi2S3 nanoparticles on the surface of the SnO2 materials. Under the stimulation of visible light and ascorbic acid as an efficient electron donor, the NCQDs and Bi2S3 co-sensitized mesoporous SnO2 microflower (SnO2/NCQDs/Bi2S3) modified ITO electrode exhibited an excellent photoelectric signal arriving at around 150 μA. Moreover, a novel label-free PEC sensor based SnO2/NCQDs/Bi2S3 composite was constructed, which enabled the ultrasensitive detection of N-terminal pro-B-type natriuretic peptide (NT-proBNP). The photocurrents decreased linearly with the logarithm of NT-proBNP concentration in the range of 0.01-50 ng mL-1 with a detection limit of 3.7 pg mL-1 (S/N = 3). Furthermore, the novel PEC immunosensor showed perfect selectivity, good stability and reproducibility, which suggest promising applications in the sensing and clinical diagnosis of cardiac disease.