If hilar and mediastinal lymph node metastases occur in solid nodule lung cancer is critical for tumor staging, which determines the treatment strategy and prognosis of patients. We aimed to develop an effective model to predict hilar and mediastinal lymph node metastases by using texture features of solid nodule lung cancer. Two hundred eighteen patients with solid nodules on CT images were analyzed retrospectively. The 3D tumors were delineated using ITK-SNAP software. Radiomics features were extracted from unenhanced and enhanced CT images based on AK software. Correlations between radiomics features of unenhanced and enhanced CT images were analyzed with Spearman rank correlation analysis. According to pathological findings, the patients were divided into no lymph node metastasis group and lymph node metastasis group. All patients were randomly divided into training group and test group at a ratio of 7:3. Valuable features were selected. Multivariate logistic regression was used to build predictive models. Two predictive models were established with unenhanced and enhanced CT images. ROC analysis was used to estimate the predictive efficiency of the models. A total of 7 categories of features, including 107 features, were extracted. There was a high correlation between the 7 categories of features from unenhanced CT images and enhanced CT images (all r > 0.7, p < 0.05). Among them, the shape features had the strongest correlation (mean r = 0.98). There were 5 features in the enhanced model and the unenhanced model, which had important predicting significance. The AUCs were 0.811 and 0.803, respectively. There was no significant difference in the predictive performance of the two models (DeLong's test, p = 0.05). Our study models achieved higher accuracy for predicting hilar and mediastinal lymph node metastasis of solid nodule lung cancer and have some value in promoting the staging accuracy of lung cancer. Our results show that CT radiomics features have potential to predict hilar and mediastinal lymph node metastases in solid nodular lung cancer. In addition, enhanced and unenhanced CT radiomics models had comparable predictive power in predicting hilar and mediastinal lymph node metastases.