The high tar yield of tar-rich coal is ascribable to the complex interplay and coupling effects among various factors, which pose a significant challenge to its tar yield prediction owing to its intricate formation mechanism. This study employed artificial neural networks to predict the tar potential and maceral recognition considering the case of tar-rich coal in northern Shaanxi Province. A deep neural network model based on the U-Net architecture was utilised for high-precision quantitative analysis of macerals. In addition, traditional instrumental analyses were conducted to acquire fundamental coal quality parameters, such as industrial analysis, elemental analysis, and tar yield data. Subsequently, key features closely related to tar yield were carefully selected through correlation analysis. Finally, multiple statistical regression (MSR), backpropagation neural networks (BPNN), and convolutional neural networks (CNNs) were employed to construct a tar yield prediction model. Experimental results revealed that the hydrogen-rich feature parameters (Vad, Hd, and V) in tar-rich coal exhibited the most pronounced influence on tar yield. In terms of maceral recognition, U-Net performed exceptionally well, achieving an average accuracy of 72.16%, with the prediction accuracy for the four main macerals (vitrinite, inertinite, carbonate minerals, and sulfide minerals) surpassing 90.00%. With respect to the tar yield prediction, the neural network predictive models surpassed the MSR predictive models in terms of performance. Both the BPNN and CNN prediction models had a coefficient of determination greater than or equal to 0.95, especially for the Group CNN prediction model optimised by group convolution, which had a coefficient of determination as high as 0.98, an average absolute error as low as 0.18%, and a root mean square error of only 0.24%. The application of neural networks in deciphering the maceral and tar-producing characteristics of tar-rich coal can significantly enhance the associated analytical efficiency and precision.