The Gorkha dynasty was established by Khas king Dravya Shah. king Rama Shah, Dambar Shah, Krishna Shah, Rudra Shah, Prithvipati Shah and Nara bhupal Shah ruled over the state of Gorkha in succession.
Nara Bhupal Shah married the princess of Khaachi state, Chandra Pravawati and about a year later he ascended to the throne of Gorkha immediately after which he married Kausalyavati Devi. She is the daughter of the King of Palpa Gundharva Sen. No children were born of Nara Bhupal Shah from either queen which prompted him to marry two royal princesses, Buddhimati and Subhadramati. Later, Queen Kausalyavati Devi gave birth to a child and named Prithivi Narayan Shah. Maharajadhiraja Prithivi Narayan Shah was born on Poush 27, 1779 B.S. (1716 A.D.). Visionary king Prithvi Narayan Shah is credited for starting the campaign for the unification of the Greater Nepal. He had a vision and dream, to unify all the small kingdoms know as baise, chaubise rajya to create a larger nation.
Prithivi Narayan Shah was educated by Upadhyayas Mokchyeshwor Aryal and Bhanu Aryal. After the death of King Nara Bhupal Shah, Prithivi Narayan Shah ascended to the throne of Gorkha. He became king at the age of 20. In those days there were a total of 54 states in Nepal, along with Gorkha, Mustang, Kantipur, Bhaktapur, Lalitpur and in the South-Eastern Terai, there were three Sen states Makawanpur, Bijayapur, Chaudandi. In the West, from Gorkha to Gandaki Province, there were 24 states and in the province of Karnali, there were 22 states with Kalyan, Samaal, Shahi and Chand dynasties.
After becoming king he started to contemplate on the methods to turn Gorkha into a big kingdom for which he went to Varanasi to gain first hand knowledge about the neighboring states and about India to the south. His father-in-law Abhiman Singh, procured for him some firearms in Varanasi. Then he began unification of the modern Nepal and first attempt at invasion of Nuwakot. He was defeated in his first attempt but later Nuwakot army was defeated. After that he started conquering other states.
Prithvi Narayan Shah suffered by illness and he gave messages to his brothers, son, ministers which was written down and was compiled as Divyopadesh. He considered Nepal as the garden of four caste and 36 sub-castes. He strongly emphasized local production and he gave the idea that if foreign traders enter Nepal then they will suck the country dry. He also wanted the money to remain inside the country. He famously said, “if the people are capable then the palace will also remain stronger”. Prithvi Narayan Shah considered the state of Nepal as a ‘ Yam between two boulders ‘, referring to China on the North and the ‘Emperor of Seas’ to the South.
Prithvi Narayan Shah died at Devighat, Nuwakot at the age of 52 in Magh 1st, 1831 B.S.(January 15, 1775). After his death, his elder son, Pratap Singh Shah, succeeded him. His unification campaign was continued by his younger son Bahadur Shah.