Multi-color (B V R c I c ) CCD photometric light curves of the contact binary V502 Oph are analyzed using the Wilson-Devinney (W-D) program. The solutions reveal that V502 Oph is a W-subtype contact (f = 35.3%) binary system. The temperature difference between its two components is 240K and the more massive star has a lower surface temperature. A cool spot is added in our model to account for the light curves' asymmetry (O'Connell effect) and third light is detected for the first time in the light curves' modeling. Combining the orbital inclination (i = 76.4 • ) with the published mass function of V502 Oph, the absolute physical parameters of the two components are determined, which are M 1 = 0.46(±0.02)M ⊙ , M 2 = 1.37(±0.02)M ⊙ , R 1 = 0.94(±0.01)R ⊙ , R 2 = 1.51(±0.01)R ⊙ , L 1 = 1.13(±0.02)L ⊙ and L 2 = 2.49(±0.03)L ⊙ . The formation and evolutionary status of V502 Oph are discussed. All photoelectric and CCD times of light minimum about V502 Oph are gathered and its orbital period variations are analyzed. The results show that the orbital period of V502 Oph is decreasing continuously at a rate of dP/dt = −1.69 × 10 −7 day • year −1 , which corresponds to a conservative mass transfer rate of dM 2 dt = −3.01 × 10 −8 M ⊙ /year. The light-travel time effect (LTTE) is due to the presence of a close-in tertiary component with a period of P 3 = 18.7 years and an amplitute of 0.00402days. V502 Oph is an ideal target to test the formation and evolution theories of binary and multiple systems in which the light curves, O − C curve and spectroscopic observations are comprehensively researched.