Reasonable and effective determination of uniaxial compressive strength (UCS) is critical for rock mass engineering stability research, design, and construction. To estimate the UCS of rock simply, conveniently, and accurately, a selective ensemble learning technology is introduced here based on modern artificial intelligence research, and a prediction method of the UCS of rock via genetic algorithm-selective ensemble learning (GA-SEL) is proposed. Based on a UCS data set, a batch of different base learners was firstly trained independently with the data sample and the algorithm parameter perturbation method. Then, the optimal base learner subset was searched using GA. Further, the GA-SEL model was constructed by fusing the base learners in that subset. According to the 161 data set collected, the prediction performance of the GA-SEL model was evaluated by four evaluation indices, then two empirical regression models and seven common machine learning models were compared with it. The results of the GA-SEL model agreed with the measured data very well, showing that the model had the best prediction and generalization ability, it was more stable and accurate than the empirical methods and common machine learning models. Because it only needs seven high-quality base learners, the GA-SEL model also has better operation efficiency compared to other ensemble learning models. Therefore, this method could be used as an effective method to predict the UCS of rock and serve for rock engineering problems.