Bamboo is a natural composite material with a unique structure. Establishing the relationship between the structure and mechanical characteristics of bamboo is crucial for its industrial applications. In this paper, we developed a non-destructive testing system using finite element analysis (FEA) and machine learning (ML) to predict the axial compression performance of Phyllostachys edulis. The results showed that the volume fraction of fiber sheaths (FS) was positively correlated with their axial compression performance. Under axial loading, all bamboo blocks exhibited stages of linear elastic deformation, elastic-plastic, and plastic plateau. The displacements to reach the proportional limit, yield point, and maximum point decreased with the increase in the volume fractions of FSs. The ML, incorporating the tree model (DT), random forest model (RF), gradient enhanced random forest regression model (GERFR), and support vector machine linear model (SVM) was able to predict the axial compression strength of the bamboo blocks, with an accuracy of 91 % for the SVM. In the compression experiments, five failure models were observed, with samples containing a high volume fraction of FSs being more prone to shear failure. In addition, our study indicated that the FEA accurately simulated the stress distribution and potential failure types when bamboo is under compression. This not only validated the results of the axial compression experiments but also underscored the potential of FEA as a predictive tool. Overall, this study introduces novel and effective methods for predicting the mechanical properties of bamboo, enabling rapid assessment of its structural characteristics.