Munshi Premchand was born on 31 July, 1880 in Lamhi, a village located near Varanasi (Benares) and was named Dhanpat Rai ("master of wealth"). His ancestors came from a large Kayastha family, which owned eight to nine bighas of land. His grandfather, Guru Sahai Rai was a patwari (village land record-keeper), and his father Ajaib Rai was a post office clerk. His mother was Anandi Devi of Karauni village, who probably was also his inspiration for the character Anandi in his Bade Ghar Ki Beti. Dhanpat Rai was the fourth child of Ajaib Lal and Anandi; the first two were girls who died as infants, and the third one was a girl named Suggi. His uncle, Mahabir, a rich landowner, nicknamed him "Nawab" ("Prince"). "Nawab Rai" was the first pen name chosen by Dhanpat Rai.
When he was 7 years old, Dhanpat Rai began his education at a madrasa in Lalpur, located near Lamahi He learnt Urdu and Persian from a maulvi in the madrasa. When he was 8, his mother died after a long illness. His grandmother, who took the responsibility of raising him, died soon after. Premchand felt isolated, as his elder sister had already been married, and his father was always busy with work. His father, who was now posted at Gorakhpur, remarried, but Premchand received little affection from his stepmother. The stepmother later became a recurring theme in Premchand's works.
As a child, Dhanpat Rai sought solace in fiction, and developed a fascination for books. He heard the stories from the Persian-language fantasy epic Tilism-e-Hoshruba at a tobacconist's shop. He took the job of selling books for a book wholesaler, thus getting the opportunity to read a lot of books. He learnt English at a missionary school, and studied several works of fiction including George W. M. Reynolds's eight-volume The Mysteries of the Court of London. He composed his first literary work at Gorakhpur, which was never published and is now lost. It was a farce on a bachelor, who falls in love with a low-caste woman. The character was based on Premchand's uncle, who used to scold him for being obsessed with reading fiction; the farce was probably written as a revenge for this.
After his father was posted to Jamniya in the mid-1890s, Dhanpat Rai enrolled at the Queen's College at Benares as a day scholar. In 1895, he was married at the age of 15, while still studying in the ninth grade. The match was arranged by his maternal step-grandfather. The girl was from a rich landlord family and was older than Premchand, who found her quarrelsome and not good-looking.
His father died in 1897 after a long illness. He managed to pass the matriculation exam with second division (below 60% marks). However, only the students with first division were given fee concession at the Queen's College. He then sought admission at the Central Hindu College, but was unsuccessful because of his poor arithmetic skills. Thus, he had to discontinue his studies. He then obtained an assignment to coach an advocate's son in Benares at a monthly salary of five rupees. He used to reside in a mud-cell over the advocate's stables, and used to send 60% of his salary back home. Premchand read a lot during these days. After racking up several debts, in 1899, he once went to a book shop to sell one of his collected books. There, he met the headmaster of a missionary school at Chunar, who offered him a job as a teacher, at a monthly salary of ₹ 18. He also took up the job of tutoring a student at a monthly fees of ₹ 5.
In 1900, Premchand secured a job as an assistant teacher at the Government District School, Bahraich, at a monthly salary of ₹ 20. Three months later, he was transferred to the District School in Pratapgarh, where he stayed in an administrator's bungalow and tutored his son.
Dhanpat Rai first wrote under the pseudonym "Nawab Rai". His first short novel was Asrar e Ma'abid ("Secrets of God's Abode", Devasthan Rahasya in Hindi), which explores corruption among the temple priests and their sexual exploitation of poor women. The novel was published in a series in the Benares-based Urdu weekly Awaz-e-Khalk from 8 October 1903 to February 1905. Literary critic Siegfried Schulz states that "his inexperience is quite evident in his first novel", which is not well-organized, lacks a good plot and features stereotyped characters. Prakash Chandra Gupta calls it an "immature work", which shows a tendency to "see life only black or white".
Stay at Kanpur
From Pratapgarh, Dhanpat Rai was relocated to Allahabad for training, and subsequently posted at Kanpur in 1905. He stayed in Kanpur for around four years, from May 1905 to June 1909. There he met Munshi Daya Narain Nigam, the editor of the Urdu magazine Zamana, in which he later published several articles and stories.
Premchand visited his village Lamahi during the summer vacation, but did not find the stay enjoyable because of a number of reasons. He did not find the weather or the atmosphere conducive for writing. Plus, he faced domestic trouble due to quarrels between his wife and his step-mother. Premchand angrily scolded his wife, after she unsuccessfully tried to commit suicide by hanging. Dismayed, she went to her father's house, and Premchand displayed no interest in bringing her back. In 1906, Premchand married a child widow, Shivarani Devi, who was the daughter of a landlord from a village near Fatehpur. The step was considered to be revolutionary at that time, and Premchand faced a lot of social opposition. After his death, Shivarani Devi wrote a book on him, titled Premchand Ghar Mein ("Premchand in House").
In 1905, inspired by the nationalist activism, Premchand published an article on the Indian National Congress leader Gopal Krishna Gokhale in Zamana. He criticised Gokhale's methods for achieving political freedom, and instead recommended adoption of more extremist measures adopted by Bal Gangadhar Tilak. Premchand's first published story was Duniya Ka Sabse Anmol Ratan ("The Most Precious Jewel in the World"), which appeared in Zamana in 1907. According to this story, the most precious 'jewel' was the last drop of blood necessary to attain independence. Many of Premchand's early short stories had patriotic overtones, influenced by the Indian independence movement.
Premchand's second short novel Hamkhurma-o-Hamsavab (Prema in Hindi), published in 1907, was penned under the name "Babu Nawab Rai Banarsi". It explores the issue of widow remarriage in the contemporary conservative society: the protagonist Amrit Rai overcomes social opposition to marry the young widow Poorna, giving up his rich and beautiful fiancée Prema. According to Prakash Chandra Gupta, "while containing seeds of his future greatness in many ways, the novel is still youthful and lacks the discipline which full maturity brings".
In 1907, another of Premchand's short novels, Kishna was published by the Medical Hall Press of Benares. This 142-page work, which satirises women's fondness for jewellery, is now lost. Literary critic Nobat Rai criticised the work in Zamana, calling it a mockery of the women's conditions.
During April–August 1907, Premchand's story Roothi Rani was published in serial form in Zamana. Also in 1907, the publishers of Zamana published Premchand's first short story collection, titled Soz-e-Watan. The collection, which was later banned, contained four stories which sought to inspire the Indians in their struggle for political freedom.