High-dispersion (λ/δλ ≈ 25,000) infrared spectra of Comet C/2004 Q2 (Machholz) were acquired on 2004 November 28-29, and 2005 January 19 (UT dates) with the Near InfraRed echelle SPECtrograph (NIRSPEC) at the Keck-2 telescope on Mauna Kea. We detected H2O, CH4, C2H2, C2H6, CO, H2CO, CH3OH, HCN, and NH3 and we conducted a sensitive search for CH3D. We report rotational temperatures, production rates, and mixing ratios (with respect to H2O) at heliocentric distances of 1.49 AU (2004 November) and 1.21 AU (2005 January). We highlight three principal results. (1) The mixing ratios of parent volatiles measured at 1.49 AU and 1.21 AU agree within confidence limits, consistent with homogeneous composition in the mean volatile release from the nucleus of C/2004 Q2. Notably, the relative abundance of C2H6/C2H2 is substantially higher than those measured in other comets, while the mixing ratios C2H6/H2O, CH3OH/H2O, and HCN/H2O are similar to those observed in comets, referred to as organics-normal . (2) The spin temperature of CH4 is \u3e35-38 K, an estimate consistent with the more robust spin temperature found for H2O. (3) We obtained a 3σ upper limit of CH3D/CH4 \u3c 0.020 (D/H \u3c 0.005). This limit suggests that methane released from the nucleus of C/2004 Q2 is not dominated by a component formed in extremely cold (near 10 K) environments. Formation pathways of both interstellar and nebular origin consistent with the measured D/H in methane are discussed. Evaluating the relative contributions of these pathways requires further modeling of chemistry including both gas-phase and gas-grain processes in the natal interstellar cloud and in the protoplanetary disk