A negative muon in hydrogen targets, e.g., D2 or D-T mixture, can catalyze nuclear fusions following a series of atomic processes involving muonic hydrogen molecular formation (muon-catalyzed fusion, muCF). The ortho-para state of D2 is a crucial parameter not only for enhancing the fusion rate but also to precisely investigate various muonic atom processes. We have developed a system for controlling and measuring the ortho-para ratio of D2 gas for muCF experiments. We successfully collected para-enriched D2 without using liquid-hydrogen coolant. Ortho-enriched D2 was also obtained by using a catalytic conversion method with a mixture of chromium oxide and alumina. The ortho-para ratio of D2 gas was measured with a compact Raman spectroscopy system. We produced large volume (5-30 l at STP), high-purity (less than ppm high-Z contaminant) D2 targets with a wide range of ortho-para ratios (ortho 20%-99%). By using the ortho-para controlled D2 in muCF experiments, we observed the dependence of muCF phenomena on the ortho-para ratio.