Samples made of tungsten doped either with titanium carbide (W–1.1TiC) or tantalum carbide (W–3.3TaC) were either exposed to D2 gas at a pressure of 100kPa at 800–963K or irradiated by 38eV/D ions at 800K. The deuterium (D) inventory in the samples was examined by nuclear reaction analysis and thermal desorption spectroscopy. The D bulk concentration and total retention in W–3.3TaC were comparable in all cases to that in pure polycrystalline W. The D bulk concentration in W–1.1TiC was more than one order of magnitude higher than that in pure W after exposure to D2 gas, and was also several times higher than that in W–1.1TiC after irradiation at 800K. It is suggested that D trapping inside the carbide precipitates in W–1.1TiC becomes essential at high temperatures.