We present a radial velocity study of the triple-lined system Gliese 644 and derive spectroscopic elements for the inner and outer orbits with periods of 2.965 5 and 627 d. We also utilize old visual data, as well as modem speckle and adaptive optics observations, to derive a new astrometric solution for the outer orbit. These two orbits together allow us to derive masses for each of the three components in the system: M-A = 0.410 +/-0.028 (6.9 per cent), M-Ba = 0.336 +/-0.016 (4.7 per cent), and M-Bb = 0.304 +/-0.014 (4.7 per cent) M-circle dot. We suggest that the relative inclination of the two orbits is very small. Our individual masses and spectroscopic light ratios for the three M stars in the Gliese 644 system provide three points for the mass-luminosity relation near the bottom of the main sequence, where the relation is poorly determined. These three points agree well with theoretical models for solar metallicity and an age of 5 Gyr. Our radial velocities for Gliese 643 and vB 8, two common proper motion companions of Gliese 644, support the interpretation that all five M stars are moving together in a physically bound group. We discuss possible scenarios for the formation and evolution of this configuration, such as the formation of all five stars in a sequence of fragmentation events leading directly to the hierarchical configuration now observed, versus formation in a small N cluster with subsequent dynamical evolution into the present hierarchical configuration.