In this paper, artificial neural network (ANN) models are presented in order to enable a prompt assessment of the stability factor of tunnels in rock masses based on the Hoek–Brown (HB) failure criterion. Importantly, the safety assessment is one of the serious concerns for constructing tunnels and requires a reliable and accurate stability analysis. However, it is challenging for engineers to construct finite element limit analysis (FELA) algorithms with the HB failure criterion for tunnel stability solutions in rock masses. For the first time, a machine-learning-aided prediction of tunnel stability based on the HB failure criterion is proposed in this paper. Three different shapes of tunnels, i.e., heading tunnel, dual square tunnels, and dual circular tunnels, are considered. The inputs include four dimensionless parameters for the heading tunnel including the cover-depth ratio, the normalized uniaxial compressive strength, the geological strength index (GSI), and the mi parameter. Moreover, dual square and circular tunnels include one more additional parameter namely the distance ratio. The results present the best ANN models for each tunnel shape, providing very reliable solutions for predicting the tunnel stability based on the HB failure criterion.