In this work, the electronic and optical properties of a binary armchair antimonene-phosphorene nanoribbon have been studied with variation of the P mole fraction by first principles calculation method based on density functional theory. The calculated cohesive energy shows that the stability of the binary SbP nanoribbon increases by increasing the molar fraction of phosphorus to 100%. We show that the band gap of SbP nanoribbons can be modified by applying different mole fractions. The band gap value of SbP nanoribbon increases firstly up to mole fractions of approximately 50% and then decreases with P mole fractions of 55 to 80% and then increases with mole fractions of 85 to 100%. A direct to indirect and an indirect to direct gap transition occurs at 5 to 75% (except for 35%) and 80 to 100% mole fractions, respectively. The optical properties of the mentioned structures with different mole fractions are analyzed, and it is found that the optical properties of binary SbP nanoribbons changed by P mole fraction, the light absorption peak is mainly concentrated in the ultraviolet region. Comparing with the pure antimonene, the light absorption is significantly enhanced after increasing the mole fraction of phosphorus to 100%. From theoretical point of view, we expect that our results can offer promising applications in electronic and optical nanodevices.