Experimental and numerical results have shown that two-dimensional surface roughness can stabilize a hypersonic boundary layer dominated by second-mode instability. It is sought to understand how this physical phenomenon extends from an airflow under a perfect gas assumption to that of a real gas. To these ends, a new high-order shock-fitting method that includes thermochemical nonequilibrium and a cut-cell method to handle complex geometries unsuitable for structured body-fitted grids is presented. The new method is designed specifically for direct numerical simulation of hypersonic boundarylayer transition in a hypersonic real-gas flow with arbitrary shaped surface roughness. The new method is validated and shown to perform comparably to a high-order method with a body-fitted grid. For a Mach 10 flow over a flat plate with a real-gas model, a two-dimensional roughness element was found to stabilize the second mode when placed downstream of the synchronization location which is consistent with previous research for perfect-gas flows. For a Mach 15 flow over a flat plate, a two-dimensional surface roughness element stabilizes the second-mode instability more effectively in a real gas than in a perfect gas. Nomenclature −α i Growth rate c r Phase velocity c s Mass fraction of species s e v,s Species specific vibration energy, J/kg h Roughness height, m h o s Species heat of formation, J/kg M s Species molecular weight, kg/mol p Pressure, N/m 2 Q T −V,s Species vibration energy transfer rate, J/m 3 •s R Universal gas constant, 8.3143 J/mol• K T Translation-rotation temperature, K t Time, s T V Vibration temperature, K u j Velocity in jth direction, m/s nms Number of molecular species ns Number of species Subscripts ∞ Freestream b Blowing/suction slot s Species w Wall Symbols δ Boundary layer thickness, m δ ij Kronecker delta µ Viscosity, kg/m•s ω s Rate of species production, kg/m 3 •s ρ Density, kg/m 3