Capacitor voltage imbalance is a well-recognized issue for neutral-point-clamped (NPC) converters. Hardware solutions increase the system cost and complexity, while existing software solutions generally involve sophisticated algorithms, making it difficult to extend them for more voltage levels and full power factor range. In this paper, a new control method, termed direct-switch duty-cycle control (DSDCC), is proposed and generalized for the grid-connected <italic xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">n</i> -level NPC ( <italic xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">n</i> L-NPC) converter. This method has the advantages of balancing the capacitor voltages for the full range of power factors on the ac side. The main significance of the DSDCC is that it can achieve near-optimal performance with simple and fast control implementation for two reasons. Firstly, the DSDCC is based on the model directly concerning switches' duty cycles, which can easily generate gating signals for the converter with only one carrier. Secondly, instead of searching for an optimal control solution, near-optimal switch duty-cycles are derived such that the controller design can be greatly simplified. The extremely fast execution time of the proposed control algorithm is only about 3% of that of model predictive control for 5-level NPC converters. Experimental results are included to validate the proposed method with a 5L-NPC converter.