Through the accurate calculation of density functional theory, reveal the excellent photoelectric properties of the AlN/WSSe and WSSe/AlN heterojunction. Especially, the hole mobility of the AlN/WSSe heterojunction is as high as 3919 cm2Vs-1in armchair direction, and the hole mobility of the WSSe/AlN heterojunction is as high as 4422 cm2Vs-1in the zigzag direction. Interestingly, when two H atoms are adsorbed in the WSSe surface, the Gibbs free energy change are -0.093 eV and -0.984 eV, which tends to zero, which can promote the spontaneous reaction of electrocatalytic water decomposition to produce H2. In addition, the AlN/WSSe heterojunction exhibits significant photoelectric effect photocurrent (1.15 a02/photon) in the armchair direction and the heterojunctions have lower threshold voltage (1.5 V), that indicate the AlN/WSSe and WSSe/AlN heterojunction have great application prospect in manufacturing high-performance optoelectronic devices with fast response and low power consumption.