Owing to its kinetic nature and distinctive computational features, the lattice Boltzmann method for simulating rarefied gas flows has attracted significant research interest in recent years. In this article, a lattice Boltzmann (LB) model is presented to study microchannel flows in the transition flow regime, which have gained much attention because of fundamental scientific issues and technological applications in various micro-electromechanical system (MEMS) devices. In the model, a Bosanquet-type effective viscosity is used to account for the rarefaction effect on gas viscosity. To match the introduced effective viscosity and to gain an accurate simulation, a modified second-order slip boundary condition with a new set of slip coefficients is proposed. Numerical investigations demonstrate that the results, including the velocity profile, the non-linear pressure distribution along the channel, and the mass flow rate, are in good agreement with the solution of the linearized Boltzmann equation, the direct simulation Monte Carlo (DSMC) results, and the experimental results over a broad range of Knudsen numbers. It is shown that taking the rarefaction effect on gas viscosity into consideration and employing an appropriate slip boundary condition can lead to a significant improvement in the modeling of rarefied gas flows with moderate Knudsen numbers in the transition flow regime.