Available information concerning the elastic moduli of refractory carbides at temperatures (T) of relevance for practical applications is sparse and/or inconsistent. Ab initio molecular dynamics (AIMD) simulations at T = 300, 600, 900, and 1200 K are carried out to determine the temperature-dependences of the elastic constants of rocksalt-structure (B1) TiC, ZrC, HfC, VC, TaC compounds, as well as high-entropy (Ti,Zr,Hf,Ta,W)C and (V,Nb, Ta,Mo,W)C. The second-order elastic constants are calculated by least-square fitting of the analytical expressions of stress/strain relationships to simulation results obtained from three tensile and three shear deformation modes. Sound-velocity measurements are employed to validate AIMD values of bulk, shear, and elastic moduli of single-phase B1 (Ti,Zr,Hf,Ta,W)C and (V,Nb,Ta,Mo,W)C at ambient conditions. In comparison with the predictions of previous ab initio calculations - where the extrapolation of finite-temperature elastic properties accounted for thermal expansion while neglecting intrinsic vibrational effects - AIMD simulations produce a softening of shear elastic moduli with T in closer agreement with experiments. The results show that TaC is the system which exhibits the highest elastic resistances to tensile and shear deformation up to 1200 K, and indicate the (V,Nb,Ta,Mo,W)C system as candidate for applications that require superior toughness at room as well as elevated temperatures. (C) 2021 The Author(s). Published by Elsevier Ltd.