An explanation is found in Jawaharlal Nehru's autobiography:
We were Kashmiris. Over two hundred years ago, early in the eighteenth century, our ancestor came down from that mountain valley to seek fame and fortune in the rich plains below. Those were the days of the decline of the Moghal Empire after the death of Aurungzeb, and Farrukhsiar was the Emperor. Raj Kaul was the name of that ancestor of ours and he had gained eminence as a Sanskrit and Persian scholar in Kashmir. He attracted the notice of Farrukhsiar during the latter's visit to Kashmir, and, probably at the Emperor's instance, the family migrated to Delhi, the imperial capital, about the year 1716. A jagir with a house situated on the banks of a canal had been granted to Raj Kaul, and, from the fact of this residence, 'Nehru' (from nahar, a canal) came to be attached to his name. Kaul had been the family name; this changed to Kaul-Nehru; and, in later years, Kaul dropped out and we became simply Nehrus.
The family experienced many vicissitudes of fortune during the unsettled times that followed and the jagir dwindled and vanished away. My great grandfather, Lakshmi Narayan Nehru, became the first Vakil of the 'Sarkar Company' at the shadow court of the Emperor of Delhi. My grandfather, Ganga Dhar Nehru, was Kotwal of Delhi for some time before the great Revolt of 1857. He died at the early age of 34 in 1861.
The revolt of 1857 put an end to our family's connection with Delhi, and all our old family papers and documents were destroyed in the course of it. The family, having lost nearly all it possessed, joined the numerous fugitives who were leaving the old imperial city and went to Agra.
So, according to Jawaharlal Nehru's autobiography:
- Their ancestor, Raj Kaul, came from Kashmir
- Nehru was originally a nickname
- Ganga Dhar Nehru's father was named Lakshmi Narayan Nehru
- Family papers and documents were destroyed when they fled from Delhi to Agra
Later, it says,
In a little painting that we have of my grandfather, he wears the Moghal court dress with a curved sword in his hand, and might well be taken for a Moghal nobleman, although his features are distinctly Kashmiri.
Some conspiracy-theorists claim that he must have been Mughal, in order to have been appointed Kotwal. I don't find that argument convincing (not necessarily true), for example because Wikipedia says of Bahadur Shah II,
Zafar consciously saw his role as a protector of his Hindu subjects, and a moderator of extreme Muslim demands and the intense puritanism of many of the Orthodox Muslim sheikhs of the Ulema. In one of his verses, Zafar explicitly stated that both Hinduism and Islam shared the same essence.
[The children of the Hindu elite], especially those belonging to the administrative Khatri and Kayastha castes studied under maulvis and attended the more liberal madrasas, bringing food offerings for their teachers on Hindu festivals.
Also, the article about Khatri says,
Khatris played an important role in India's transregional trade under the Mughal Empire. With the Mughal patronage, they adopted administrative and military roles outside the Punjab region as well.
An example of the "conspiracy theory" is here:
It appears from the Moghul records that there was no Hindu Kotwal then but a Muslim Kotwal called Ghiyasuddin Ghasi who had to flee to Agra to save himself from the British who were after the lives of the Delhi Muslims following the Moghul Emperor’s challenge to the British. This Muslim Kotwal, while fleeing, changed his name/identity to the Hindu name Ganga Dhar, the father of Motilal.
To test that theory, you would need to look into the Moghul records (and/or find evidence for the existence of Lakshmi Narayan Nehru).