Feature extraction is a key step for fault diagnosis of rolling bearings based on vibration measurements. Lempel-Ziv complexity (LZC) has been widely applied to extracting fault features. However, LZC with single-scale analysis may result in the loss of fault information. Then, the multiscale LZC is proposed to uncover the multiscale features. Nevertheless, multiscale LZC would shorten the length of sequences, leading to inaccurate calculation results. Moreover, the mean operation during the coarse-grained process of the traditional multiscale analysis cannot reveal the dynamic changes of the original sequences, which may also result in the loss of potential information. Thus, this paper develops a feature extraction method called generalized variable-step multiscale LZC (GVSMLZC) for the vibration-based fault diagnosis of rolling bearings. GVSMLZC reveals more information and gains more robust complexity by improving the coarse-grained process. Moreover, GVSMLZC enhances the capability of mining dynamic characteristics by generalizing first-order moments to second-order moments. Based on the proposed GVSMLZC, fault type identification and fault detection of life-cycle data schemes are designed to realize the fault diagnosis of rolling bearings. Simulated and experimental results demonstrate that GVSMLZC outperforms multiscale LZC, variable-step multiscale LZC, and multiscale sample entropy in extracting bearing fault information.