Photometric data on FG Hya obtained in 2002 and 2004 are presented. Three data sets show the exchange between A-type, W-type and the variable O'Connell effects. The photometric mass ratio (q= 0.1115 +/- 0.0003) derived from B and V light curves is almost the same as the spectroscopic mass ratio (qsp= 0.112 +/- 0.004). The new photometric solutions reveal that FG Hya is a deep overcontact binary system (f= 85.6 +/- 1.8 per cent) with a spotted massive component. A period investigation, based on all available photoelectric or CCD times of light minimum, shows that the O-C curve of FG Hya can be explained as a combination of a secular period decrease and a cyclic variation with a period of 36.4yr and an amplitude of 0.0289 d. By comparing the variation of the depth of the primary minimum with the change of the cyclic period, it is discovered that both of them may vary with the same cycle length of 36.4yr and in the same phase. The variation of the light curve, the spotted primary component and the connection between the cyclic period change and the depth of the primary minimum, all may suggest that the G0-type component displays solar-type magnetic activity with a 36.4-yr cycle length. The long-time period decrease is interpreted by mass transfer from the more massive component to the less massive one or/and angular momentum loss due to mass outflow from the outer Lagrangian point.