Whether negi'ah is assur mi'doraisa, mi'd'rabbanan, or even muttar, is a machlokes amora'im in Shabbos (13a) and Avodah Zarah (17a).
Assuming it is assur, and it was mentioned that the Rambam paskens it is d'oraisa, it is a fence put in place to distance one from the actual act of giluy arayos. (Yes there are fences that are d'oraisa. The classic example is the prohibition of a nazir to eat grapes.)
Covering hair, IMHO, has nothing to do with arayos. I once wrote an essay on this and I had a number of problems trying to say it is indeed because of ervah,* and the truth is you wont find me a single rishon who explains it this way.
And by the way, the Rambam who learns that negi'ah is d'oraisa, understands that covering hair is only d'rabbanan. The Terumas Hadeshen (1:242) writes: דלפי הרמב"ם פריעת ראש באשה אינו אלא זהירות מדרבנן.
*כתיב ופרע את ראש האשה, ותנא דבי רבי ישמעאל, אזהרה שלא יצאו בנות ישראל בפרוע ראש. ולכאורה דבר ברור הוא דאין אזהרה זו משום שער באשה ערוה, דא"כ אמאי קאמר דמדאורייתא קלתה שפיר דמי, והא שערותיה מגולין. ועוד דבכ"מ שהוזכר דרשה זו לא מצינו לשון גלוי שער אלא לשון פרוע ראש, ואם איסור זה הוא משום שער באשה ערוה הרי העיקר חסר מן הספר. ועוד דא"כ אמאי לא הביאו רב ששת לענין שער באשה ערוה ואמאי שביק קרא דאורייתא ונקט קרא דכתובים. אלא לפום ריהטא פשוט דאינו משום ערוה