We present a calculation of the fully exclusive parton cross sections for heavy-quark production at order O(alpha(S)3) in QCD. Our result includes the Born cross section for producing a QQBAR pair, of order O(alpha(S)2), the virtual corrections to the Born cross section, of order O(alpha(S)3), and the cross section for producing a QQBAR pair plus a light parton, of order O(alpha(S)3). We can therefore compute distributions in which correlations among the heavy quarks (and, if present, the associated jet) are correctly taken into account up to order O(alpha(S)3). We present some applications of phenomenological interest to top, bottom and charm production at hadron colliders.