We study the issue of separating hadronic jets that contain bottom quarks ($b$-jets) from jets featuring light partons only. We develop a novel approach to $b$-tagging that exploits the application of QCD-inspired jet substructure observables such as one-dimensional jet angularities and the two-dimensional primary Lund plane. We demonstrate that these observables can be used as inputs to modern machine-learning algorithms to efficiently separate $b$-jets from light ones. In order to test our tagging procedure, we consider simulated events where a $Z$ boson is produced is association with jets and show that using jet angularities as an input for a deep neural network, as well as using images obtained from the primary Lund jet plane as input to a convolutional neural network, one can achieve tagging accuracy comparable with the accuracy of conventional track-based taggers. We argue that the complementary usage of the track-based taggers together with the ones based upon QCD-inspired observables could improve $b$-tagging accuracy.