The spin-rotation of a planet arises from the accretion of angular momentum during its formation, but the details of this process are still unclear. In the solar system, the equatorial rotation velocities and spin angular momentum of the planets show a clear trend with mass, except for Mercury and Venus which have significantly spun down since their formation due to tidal interactions. Here we report on near-infrared spectroscopic observations at R=100,000 of the young extra-solar gas giant beta Pictoris b. The absorption signal from carbon monoxide in the planets thermal spectrum is found to be blueshifted with respect to the velocity of the parent star by (-15+-1.7) km/sec, consistent with a circular orbit. The combined line profile exhibits a rotational broadening of 25+-3 km/sec, meaning that Beta Pictoris b spins significantly faster than any planet in the solar system, in line with the extrapolation of the known trend in spin velocity with planet mass.