This study was to explore the value of magnetic resonance imaging (MRI) technology processed by convolutional neural network (CNN) optimization algorithms in the clinical research of patients with chronic pain caused by myofascial trigger points (MTrPs). Firstly, referring to the traditional iterative algorithm, this study iterated the convolution network and data consistency layer as a whole for several times, which increased the fitting ability of the data consistency layer and network. When it was applied to magnetic resonance examination, it could be concluded that the effect of its reconstruction method was better than the traditional convolution neural network without the data consistency layer. The image edge was clear, and the restoration effect of details was better. 100 patients with chronic neck pain caused by MTrP were collected and divided into an ultrasound treatment group and a local anesthetic drug injection group, with 50 cases in each group. In addition, 50 healthy volunteers were selected. After clinical treatment, the results showed that, after 3 weeks of treatment, the visual analog score (VAS) and the pain rating index (PRI) of the injection group were 3.16 ± 1.14 points and 4.92 ± 1.26 points, respectively; the present pain intensity (PPI) score was 2.06 ± 0.85 points, and the number of pain days per month was 7.73 ± 1.15. After 1 month of treatment, the VSA and PRI of the injection group were 1.24 ± 0.89 and 1.31 ± 0.97, respectively; the PPI score was 1.34 ± 0.65, and the number of pain days per month was 5.34 ± 0.98. In addition, there were 38 cases reaching the level of clinical cure, accounting for 76%. Therefore, all indicators in the injection group were better than those in the ultrasound treatment group, and the differences were statistically significant (
P
<
0.05
). The results of MRI examination showed that compared with the healthy control group, patients with chronic pain caused by the myofascial trigger point had reduced axial kurtosis (AK), mean kurtosis (MK), and radial kurtosis (RK) in multiple brain areas such as the right parahippocampal gyrus and the right medial prefrontal cortex. In short, chronic pain caused by the trigger point of the myofascial membrane would affect the microstructure of the gray matter of the patient’s brain. In clinical treatment, the efficacy of local anesthetic injection was better than ultrasound therapy.