CoRoT, the first space-based transit search, provides ultra-high precision light curves with continuous time-sampling over periods, of up to 5 months. This allows the detection of transiting planets with relatively long periods, and the simultaneous study of the host stars photometric variability. In this letter, we report on the discovery of the transiting giant planet CoRoT-Exo-4b and use the CoRoT light curve to perform a detailed analysis of the transit and to determine the stellar rotation period. The CoRoT light curve was pre-processed to remove outliers and correct for orbital residuals and artefacts due to hot pixels on the detector. After removing stellar variability around each transit, the transit light curve was analysed to determine the transit parameters. A discrete auto-correlation function method was used to derive the rotation period of the star from the out-of-transit light curve. We derive periods for the planets orbit and stars rotation of 9.20205 +/- 0.00037 and 8.87 +/- 1.12 days respectively, consistent with a synchronised system. We also derive the inclination, i = 90.00 -0.085 +0.000 in degrees, the ratio of the orbital distance to the stellar radius, a/R_s = 17.36 -0.25 +0.05, and the planet to star radius ratio R_p/R_s = 0.1047 -0.0022 +0.0041. We discuss briefly the coincidence between the orbital period of the planet and the stellar rotation period and its possible implications for the systems migration and star-planet interaction history.