In recent years, hyperspectral image (HSI) classification methods based on deep learning with few samples have received extensive attention. To extract more discriminative HSI features and prevent the network from degradation due to deepening, this paper proposed a network based on the triple-branch ternary-attention mechanism and improved dense2Net (TBTA-D2Net) for HSI classification. In this paper, the spatial information is taken as a two-dimensional vector, and the spectral features, spatial-X features, and spatial-Y features are extracted separately in three branches. A dense2Net bottleneck module and an attention module are designed on each of these three branches. Finally, the features extracted from the three branches are fused for classification. To evaluate the effectiveness of the TBTA-D2Net algorithm, experiments are conducted on three publicly available hyperspectral datasets, Indian Pines (IP), Pavia University (UP), and Salinas Valley (SV). The experimental results show that in the case of the small proportion of training samples, the TBTA-D2Net algorithm performs better than the other comparative algorithms in classification. The overall classification accuracy of OA improved by an average of 1.55%-4.12% over the second-best algorithm.