The self-balancing wheelchair is characterized by its small size, flexibility, and strong ground adaptability. To expand the control range of the pitch angle and enhance the stability of the self-balancing wheelchair, this paper presents a nonlinear model predictive control (NMPC) method for challenges in online motion planning and control. We apply the NMPC formulation with the nonlinear state equation as a constraint that captures the accurate kinematics and dynamics of the wheelchair. We utilize direct transcription to discretize the formulation and convert it into a nonlinear programming problem. We establish a control loop that includes a PD controller to apply NMPC to a wheelchair. We conduct simulations under different state commands and external forces and demonstrate that the proposed method can achieve fast convergence speeds, strong robustness, and high stability motions under extreme pitch angles.