The hypoglossal nerve, also known as cranial nerve XII, is primarily responsible for motor control of the muscles of the tongue, which is crucial for speech and swallowing. Damage to this nerve can result in tongue weakness or atrophy, leading to difficulties with speech articulation and swallowing.