Background Atherosclerosis is associated with chronic inflammation and lipid metabolism. The neutrophil to lymphocyte ratio (NLR) as an indicator of inflammation has been confirmed to be associated with cardiovascular disease prognosis. However, few studies have explored the effects of blood lipid variability on NLR. We aimed to explore the relationship between variability in blood lipid levels and NLR. Methods The association between variability in blood lipids and NLR was assessed with both univariate and multivariate linear regression. Multivariate linear regression was also performed for a subgroup analysis. Results The variability of HDL-C ([ꞵ] 4.008, SE 0.503, p-value<0.001) and LDL-C ([ꞵ] 0.626, SE 0.164, p-value<0.001) were risk factors for the NLR value, although baseline LDL-C and HDL-C were not risk factors for NLR values. Variability of HDL-C ([ꞵ] 4.328, SE 0.578, p-value<0.001) and LDL-C ([ꞵ] 0.660, SE 0.183, p-value<0.001) were risk factors for NLR variability. Subgroup analysis demonstrated that the relationship between variability of LDL-C and NLR was consistent with the trend of the total sample for those with or without diabetes mellitus, controlled blood lipid, statins, atorvastatin or rosuvastatin. The relationship between the variability of HDL-C and NLR was consistent with the trend of the total sample in all subgroups. Conclusion The variability of HDL-C and LDL-C are risk factors for the value and variability of NLR, while the relationship between variability of HDL-C and NLR is more stable than the variability of LDL-C in the subgroup analysis.