The 4-n-pentyl-4′-cyano biphenyl (5CB) liquid crystal (LC) sandwiched and sheared between atomically flat and grooved iron walls, respectively, is simulated using molecular dynamics, and the flow behavior of the system under confinement, pressure, and shear is investigated. The order parameter P 2 , velocity, and density of 5CB are profiled as a function of distance from the walls using a block analysis method. The flow-alignment phenomenon is reproduced, and alignment angles ranging from 11.3°to 13.9°are observed. The competition between the elastic effect of the surface and viscous effect of the flow on the orientation of the 5CB molecules is investigated. The P 2 of 5CB located in the vicinity of the grooved walls is higher than that of the flat walls, while this difference is negligible in the case of 5CB distanced from the walls. Instead of boundary slip or Couette flow, the velocity profiles reveal a boundary condition (BC) of central localization, which is very different from the assumed Couette flow BC in most analytical models of LC flow. This work enhances the current molecular-scale understanding of the flow behavior of confined liquid crystals and provides additional insights into the phenomenon.