This paper describes the calibration procedure for the drift tubes of the CMS barrel muon system and reports the main results obtained with data collected during a high statistics cosmic ray data-taking period. The results of the data analysis are presented and discussed.