The magnetic, mechanical, and electronic properties of RhHx (x = 0, 0.25, 0.75, 1) have been investigated by first-principles calculations based on density functional theory. It is shown that RhHx (x = 0.25, 0.75, 1) in the cubic structure are magnetic except for Rh. The total magnetic moments of RhHx (x = 0.25, 0.75, 1) decrease with increasing content of H, which mainly results from the change of the Rh moments. The calculated elastic constants indicate that RhHx (x = 0, 0.25, 0.75, 1) in the cubic structure are mechanically stable. With increasing H content, the bulk modulus, shear modulus, and Young modulus gradually decrease except the bulk modulus of RhH. By means of the values of the B/G ratio, it is concluded that H doping improves the ductile properties of Rh. The strong hybridization between H-s and Rh-d is the origin of magnetism for RhHx (x = 0.25, 0.75, 1) and decreases with increasing H content.