This isn’t as strange as you might think. Nerves to the structures of the neck and shoulder overlap. Pain signals from the shoulder may be sent to the neck causing this confusion. This phenomena is called referred pain.
One condition in particular may be at fault. This is called shoulder impingement. Doctors at Stonybrook University School of Medicine in New York reported on this problem in 34 neck pain patients. One of the most telltale signs is neck pain with the shoulder motion you describe.
Neck pain from shoulder impingement is treatable. See your doctor soon for an exam.