There is mounting evidence of an association between chronic neck pain and impaired cervical flexor muscle performance. It is likely that the deep cervical flexors demonstrate changes very early after the onset of pain, but evidence is currently lacking. This study investigated the effect of experimental neck muscle pain on the activation of the cervical flexor muscles during the performance of craniocervical flexion (CCF) by use of muscle functional magnetic resonance imaging. Activity of the longus colli (Lco), longus capitis (Lca) and sternocleidomastoid (SCM) muscles were investigated bilaterally and at three cervical levels (C0–C1, C2–C3 and C6–C7) in 14 healthy subjects. Measurements were performed at rest and after the performance of CCF without and with induced pain of the upper trapezius (intramuscular injection of hypertonic saline). In the non-pain condition, the Lca (p = 0.005) and Lco (p = 0.029) were significantly more active during CCF compared to SCM. In the pain condition, the activity of the Lco and Lca was reduced bilaterally and at multiple levels (p ≤ 0.009), whereas the left SCM showed increased activity at only the C6–C7 level (p ≤ 0.001). The results suggest that local excitation of nociceptive afferents causes an immediate reorganization of the cervical flexor muscle activity similar to that identified in clinical populations.