As an efficient and environmentally friendly source of energy, shale gas is abundantly available and continues to contribute to the economy growth because of its huge potential for production. However, accurately predicting the transport behavior of shale gas is still challenging due to the small scale and complexity of nanochannels, which impedes the efficiency of recovery. In this paper, the transport behavior of shale gas in nanochannels with fractal roughness is studied by molecular dynamics simulation and theoretical analysis. It is found that the present work functions well to predict the transport behavior of shale gas in nanochannels with roughness. The introduction of fractal roughness hinders the transport of shale gas and leads to a complex trajectory of methane molecules in nanochannels. Furthermore, it is interesting to find the average gas viscosity increases, while the gas flux decreases with the increase in the inclined angle due to the impediment effect after the deflection. These results are helpful for understanding the migration of shale gas in nanochannels with roughness and guiding the improvement of shale gas recovery in practical applications.