The study aimed to compare the morphometric and morphologic analyses of the bone structures of temporomandibular joint and masticatory muscles on Cone beam computed tomography (CBCT) in 62 healthy subjects and 33 subjects with temporomandibular dysfunction (TMDS) aged between 18 and 56 years. In addition, a machine learning (ML) pipeline involving the Random Forest classifier was used to automatically detect TMDS. Thirty parameters (including age and gender) associated with the condylar process, articular tubercle, mandibular fossa, ramus mandible, joint space, and masticatory muscles were examined using CBCT. Well-known steps including scaling, feature selection, and feature extension are used to build the ML pipeline. Among 30 parameters, angle between mediolateral axes of both the head of mandible, medial pterygoid muscle thickness (PMT), distance between the most superior point of head of the mandible and the mandibular fossa bone surface opposite, medial joint space, lateral joint space, articular tubercle inclination, mandibular fossa depth head of the mandible’s length, and angle between the ramus mandible long axis and the coronal plane values showed significant differences between healthy subjects and TMDS. Additionally, from the above measurements, all parameters (except PMT) were significantly lower in TMDS than in healthy subjects. Moreover, the results show that it is possible to automatically detect temporomandibular dysfunction with an f1-score of 0.967 when arming our ML pipeline with feature selection and extension. The reference values of the condylar process, articular tubercle, mandibular fossa, ramus of mandible, and joint space may play a key role in increasing of the success of the surgical procedure, or the assessment/differentiating of the TMD. ML is capable of detecting TMD in an automatic and highly accurate way. Hence, it is also concluded that ML can be useful for cases requiring making automatic and highly correct predictions.