A 2.5m long liquid hydrogen target has been developed for the COMPASS experiment at CERN to investigate the nucleon spin structure via the Deeply Virtual Compton Scattering (DVCS) process. To recognize exclusive DVCS events, produced photons and slow protons need to be detected. In order to do so, the material budget around the target has to be minimal. A 0.125mm thick Kapton® target cell and a 1mm thick carbon fiber vacuum chamber with a Mylar® window have been constructed and tested. Finally, the target system was successfully employed during the DVCS pilot run in COMPASS at the end of 2012. The objective of this paper is to give a detailed description of this newly developed liquid hydrogen target apparatus.