Yes, níl originally came from a combination of two words. You can still see part of them in the question form, An bhfuil. If you remember that an eclipses in this case, you see that the dependent form of the verb was fuil. Now, what does Ní (the negative particle) do? Lenites!
So now you have Ní fhuil. BUT! fh is silent, so you get Ní uil, which became written as Níl.
You use the dependent form of a verb after particles like an, ní and go. For most regular verbs, the dependent form is exactly the same as the independent form. For some irregular verbs, the dependent form is different. For the irregular verb bí, the present tense independent form is Tá, (Tá siad ag teacht) and the dependent form is fuil (an bhfuil siad ag teacht?, Níl said ag teacht, ceapaim go bhfuil siad ag teacht. níl is derived from ní fhuil).
The dictionary entry for fuil includes a link to the dictionary entry for bí.
Ní is the negative particle used with every present tense verb. It is not just the negative form of the copula.
Ní rithim - "I don't run"
Ní thiomáineann tú - "You don't drive"
Ní shnámhann sé - "He doesn't swim"
In the case of tá, the dependent form fuil is used after particles, so you get an bhfuil and go bhfuil. But ní lenites, so you get ní fhuil, and because fh is silent, ní bhfuil is pronounced ní-uil, and eventually it came to be written as níl.