The earliest work which provides the details about origin of Niazis is Makhzani-i-Afghani (1610 AD), written by Naimatullah under the patronage of Khan Jahan Lodi, an Afghan noble of Mughal emperor Jahangir. Makhzan-i-Afghani gives the genealogy of Niazi tribe as follow:
“To Lodi, God Almighty gave three sons, Niazi, Siani, and Dotani.Niazi had three sons, Bahi, Jam, Khaku.
Jam had seven sons, Bandar, Sambal, Khankhail, Doulatkhail, Isakhail,
Marhil, and Haiki.
Marhil had two sons, Hamim and Naili.
Khaku had five sons, Isa, Musa, Mahyar, Asad, and Khidar.
Isa had two sons, Ala and Gondi.
Ala had two sons, Sud and Saharangh.
Sud had two sons, Jam and Suri.
Jam had two sons, Naiku and Michan”. 
Khulastul-Ansab of Hafiz Rahmat Khan (1708–1774) gives following account of the Niazi tribe:-
“Niazi, whose descendants are the Musa khail, Isakhail, Sambal, Saharangh, whom they conjointly call Niazies: they all reside about the town of Makhad, on the banks of the Sind River, as far as Dera Ismail Khan.” 
Hayat-i-Afghani (completed in 1867 AD) gives the following account of Niazi tribe:-
“The Niyazi clans are descended from Bahi, the most devout of the three sons of Niyazi, son of Lodi. Their first known settlement was in the vicinity of Ghazni, where a few are still found. In the time of Sultan Bahlul many went away to Hindustan, and in the time of Sher Shah (Sur), we find Haibat Khan (Niyazi) with the title of Azam Humayun, subahdar of Lahore, and many Niyazi in the posts of high honour and dignity. The consciousness of power and influence tempted the Niyazi, in the time of Salim Shah (Sur), to revolt, and ended in their destruction. At present, with the exception of the Isakhel, Mushani and Sarhang, there is no considerable clan of this group now found in Afghanistan. They are now scattered here and there over a wide extent of country, and everywhere in a reduced and depressed condition. Some are found in Bangash and Togh, a few in Kandahar, Ghazni, the Shioki ilaka, the neighborhood of Kabul, Kohgar, and various parts of Hindustan. The Marhal Niyazi, the Kundi and Mutthi are nomadic traders, and have amassed some wealth, but, on the whole, it may said that the measure of this tribe’s former prosperity in Hindustanis now that of its depression in Afghanistan.” 
Miscellaneous historical information about Niazis
1- The tomb of Ibrahim Sur (grandfather of Sher Shah Sur) in Narnaul (Haryana, India) was constructed under the supervision of Aba Bakar Kundi, a Niazi. Persian inscriptions on the mausoleum provide following historical information:-
“If anyone asks you who made this building, give him the answer if you know the secret:
This dome, whose foundation is the highest heaven, was built by the king of the country, Sher [Shah], the victorious ruler,
The chief of chiefs, the lord of the seven realms, whose sword surpasses the flash of the lightning.
Farid, son of Hasan Sur, son of Ibrahim, ordered a beautiful vault, to be built over the grave of his grandfather.
If you ask me who was the superintendent, (I say it was) Aba Bakar, son of Shaikh Ahmad, the Niyazi.
If i use the general term, I may call him a Niyazi, but if I use the special term, I must call him a Kundi, and this reflects honor on his pure character.” 
3- Mian Abdullah Niazi was leader of the Mahdawi movement during the reign of Islam Shah Sur. Syed Muhammad Jaunpuri (1443 – 1505 AD), the founder of the movement, had claimed to be Imam Mahdi. Mian Ahmad Niazi was almost beaten to death by Islam Shah Sur. According to Ain-i-Akbari:-
” Islam Shah [Sur] left Agrah in (1548 AD), in order to put down disturbances in the Panjab caused by certain Niyazi Afghans, and when he arrived in the neighbourhood of Bianah, Makhdum ul-Mulk drew the king’s attention to Miyan Abdullah Niyazi, who after Shaikh Alai departure for the Deccan roamed about in the hills of the Bianah district [Rajasthan, India] with three or four hundred armed men, and was known to possess great influence over men of his own clan, and consequently over the Niyazi rebels in the Panjab. Islam Shah ordered the governor of Bianah, who had become a Mahdawi, to bring Miyan Abdullah to him. The governor advised his religious leader to conceal himself; but Miyan Abdullah boldly appeared before the king, and so displeased him by his neglect of etiquette, that Islam Shah gave orders to beat him to death. The king watched on horseback for an hour the execution of the punishment, and only left when Miyan ‘Abdullah lay apparently lifeless on the ground. But he was with much care brought back to life. He concealed himself for a long time, renounced all Mahdawi principles.” 
4- Shaikh Michan Niazi was an Afghan saint. He is buried in Wana, South Waziristan. His real name was Muhsin and he is generally said to have been 6th in descent from Khako, son of Niazi. A brief account of him is given in Makzan-i-Afghani. 
5- Notable Niazi nobles of Sher Shah Sur:
Qutb Khan Niazi
Said Khan Niazi
Shams Khan Niazi
Isa Khan Niazi
Saif Khan Niazi
Haibat Khan Niazi
Zain Khan Niazi
Saeed Khan Niazi
Fateh Khan Niazi
Mir Khan Niazi
Daulat Khan Niazi
6- Khan Zaman Khan Niazi was the chief of Niazis in mid 18th century. Ahmad Shah Abdali entrusted him with the collection of the entire Bannu and Derajat region. He was also entrusted with the recipient and transpiration of the King’s share of revenue from the Talpurs of Sindh. He accompanied Ahmad Shah Abdali to India and fought against the Marathas in the battle of Panipat. For his valour and gallantry, Ahmad Shah awarded him a bejeweled sword, still in possession of the family. During the reign of Timur Shah Durrrani, he proceeded to Sindh by the royal orders and effectively quelled a revolt. 
7- The famous tomb of Isa Khan in Delhi is incorrectly attributed to Isa Khan Niazi who died as a rebel during the reign of Islam Shah Sur. The inscription in the tomb records its construction in 954/1547-48 by Masnad-i-‘Aali ‘Isa Khan, son of Niyaz Aghwan (i.e. Niyaz was name of his father, not tribe). The inscriptions says;
“This tomb, which is an asylum of paradise, was built during the reign of Islam Shah, son of Sher Shah, may God perpetuate his kingdom and sovereignty, by Masnad Ali Isa Khan, son of Niyaz Aghwan, the chief chamberlain, in the Hijra year nine hundred and fifty-four.” 
The inscription does not even say that the tomb is of Isa Khan. Isa Khan son of Niyaz Aghwan is the name of the person who constructed the mausoleum.
1- “History Of the Afghans: Translated from the Persian of Neamet Ullah by Bernhard Dorn”, Vol-II, p-49
2- “History of the Afghans: Translated from the Persian of Neamet Ullah by Bernhard Dorn”, p-128
3 “Afghanistan and its inhabitants / translated from the Hayat-i-Afghan of Muhammad Hayat Khan, by Henry Priestly”, pp.192-193
4- “Proceedings of the Asiatic Society of Bengal”, 1875, p-222
5- “Ain-i-Akbari”, Vol-2, p-323
6- The Ain i Akbari, Vol-1, p-VIII
7- “History of the Afghans: Translated from The Persian of Neamet Ullah by Bernhard Dorn”, Vol-II, p-31
8- “History of the Pathans”, By Haroon Rashid, Vol-III, p-365
9- “Indica”, Vol-16, p-206