From the Gaelic name Niall, which is of disputed origin, possibly meaning "champion" or "cloud". This was the name of a semi-legendary 4th-century Irish king, Niall of the Nine Hostages.
In the early Middle Ages the name was adopted by Viking raiders and settlers in Ireland in the form Njal. The Vikings transmitted it to England and Scotland, as well as bringing it back to Scandinavia. It was also in use among the Normans, who were of Scandinavian origin. A famous bearer of this name was American astronaut Neil Armstrong (1930-2012), the first person to walk on the moon.