There are multiple theories surrounding the origin of the sitar.
Delhi Sultanate Origin
According to various sources the sitar was invented by Amir Khusrow, a famous Sufi inventor, poet, and pioneer of Khyal, Tarana and Qawwali, in the Delhi Sultanate. Others say that the instrument was brought from Iran and modified for the tastes of the rulers of the Delhi Sultanate and Mughal Empire.
Another theory is that the instrument is thought to have been derived from the Veena, another prominent instrument in Carnatic and Hindustani music, altered in order to conform with Mughal tastes. The sitar flourished in the 16th and 17th centuries and arrived at its present form in 18th century India, gaining prominence in the royal court of the Mughal Empire based in Northern India.