We report the identification of six short-period variables in the dense globular cluster M5. Our observations consist of multiple-epoch VI CCD images centred on the cluster and covering a 6.3x6.3 arcmin^2 field. Of the six short-period variables, one is a possible blue straggler, four lie on the cluster main-sequence turn-off, and one is about 1 mag fainter than the main-sequence turn-off. The light curves of these six variables show that five of them are probably W UMa type contact eclipsing binaries and one of them is a semicontact Algol system. Owing to incomplete phase coverage, the type identification is fairly uncertain. The periods of these six interacting binaries are between 0.4 and 0.7d. All six variables lie in the region beyond the 4r_c radius, where r_c is the cluster core radius of 24 arcsec. Using detailed artificial eclipsing binary star simulations, we have applied incompleteness corrections and estimate a total number of 11 short-period binaries in the region beyond 4r_c. Adopting a flat period distribution and a contact binary lifetime of 3 Gyr, we estimate an overall primordial binary frequency of 28^+11-5.8 per cent for the period range of 2.5d to 550 yr. To make comparative studies of short-period main-sequence eclipsing binaries (SPMSEB) in different globular clusters, we estimate that the specific frequency of SPMSEB is 0.5 per cent in M5, excluding the possible blue straggler, similar to the fraction of 0.6 per cent derived in M71 from the data published by Yan & Mateo.