In 1874 he finally escaped back to Lom; for the next five years he did any job for money; he was a store clerk, peddler, shoemaker's apprentice, sheriff's assistant, and an elementary-school Teacher.
Working all those odd jobs paid off, and he published his first book: Den Gaadefulde: En Kjærlighedshistorie fra Nordland (The Enigmatic Man: A Love Story from Northern Norway, 1877). It was inspired from the experiences and struggles he endured from his jobs.
In his second novel Bjørger (1878), he attempted to imitate Bjørnstjerne Bjørnson's writing style of the Icelandic saga narrative. The melodramatic story follows a poet Bjørger and his love for Laura. This book was published under the pseudonym Knud Pedersen Hamsund. This book later served as the basis for Victoria: En Kærligheds Historie (1898; translated as Victoria: A Love Story, 1923).
In younger years, Hamsun had leanings of an anti-egalitarian, racially conscious bent. In The Cultural Life of Modern America (1889), he expressed his fear of miscegenation: "The Negros are and will remain Negros, a nascent human form from the tropics, rudimentary organs on the body of white society. Instead of founding an intellectual elite, America has established a mulatto studfarm."
Hamsun first received wide acclaim with his 1890 novel Hunger (Sult). The semiautobiographical work described a young writer's descent into near madness as a result of hunger and poverty in the Norwegian capital of Kristiania (modern name Oslo). To many, the novel presages the writings of Franz Kafka and other twentieth-century novelists with its internal monologue and bizarre logic.
At 17 he became a ropemaker's apprentice; at about the same time he started to write. He asked businessman Erasmus Zahl to give him significant monetary support, and Zahl agreed. Hamsun later used Zahl as a model for the character Mack appearing in his novels Pan (1894), Dreamers (1904), and Benoni and Rosa (1908).
In 1898, Hamsun married Bergljot Göpfert (née Bech), who bore daughter Victoria, but the marriage ended in 1906. Hamsun then married Marie Andersen (1881-1969) in 1909 and she was his companion until the end of his life. They had four children: sons Tore and Arild and daughters Elinor and Cecilia.
Hamsun's works have been the basis of 25 films and television mini-series adaptations, starting in 1916.
Thomas Mann described him as a "descendant of Fyodor Dostoyevsky and Friedrich Nietzsche." Arthur Koestler was a fan of his love stories. H. G. Wells praised Markens Grøde (1917) for which Hamsun was awarded the Nobel Prize in Literature. Isaac Bashevis Singer was a fan of his modern subjectivism, use of flashbacks, his use of fragmentation, and his lyricism. A character in Charles Bukowski's book Women referred to him as the greatest Writer to have ever lived.
After a few years they decided to move south, to Larvik. In 1918 they bought Nørholm, an old, somewhat dilapidated manor house between Lillesand and Grimstad. The main residence was restored and redecorated. Here Hamsun could occupy himself with writing undisturbed, although he often travelled to write in other cities and places (preferably in spartan housing).
His sympathies were heavily influenced by the impact of the Boer War, seen by Hamsun as British oppression of a small people, as well as by his dislike of the English and distaste for the US. During the 1930s, most of the Norwegian right-wing newspapers and political parties were sympathetic in various degrees to fascist regimes in Europe, and Hamsun came to be a prominent advocate of such views. During WWII, he continued to express his support for Germany, and his public statements led to controversy; in particular, in the immediate aftermath of the war. When World War II started, he was over 80 years old, almost deaf, and his main source of information was the conservative newspaper Aftenposten, which had been sympathetic to Fascist Italy and Nazi Germany from the beginning. He suffered two intracranial hemorrhages during the war.
Hamsun wrote several newspaper articles in the course of the war, including his notorious 1940 assertion that "the Germans are fighting for us, and now are crushing England's tyranny over us and all neutrals". In 1943, he sent Germany’s minister of propaganda Joseph Goebbels his Nobel Prize medal as a gift. His biographer Thorkild Hansen interpreted this as part of the strategy to get an audience with Hitler. Hamsun was eventually invited to meet with Hitler; during the meeting, he complained about the German civilian administrator in Norway, Josef Terboven, and asked that imprisoned Norwegian citizens be released, enraging Hitler. Otto Dietrich describes the meeting in his memoirs as the only time that another person was able to get a word in edgeways with Hitler. He attributes the cause to Hamsun's deafness. Regardless, Dietrich notes that it took Hitler three days to get over his anger. Hamsun also on other occasions helped Norwegians who had been imprisoned for resistance activities and tried to influence German policies in Norway.
After the war, he was detained by police on June 14, 1945, for the commission of acts of treason, and was committed to a hospital in Grimstad (Grimstad sykehus) "due to his advanced age", according to Einar Kringlen (a professor and medical doctor). In 1947 he was tried in Grimstad, and fined. Norway's supreme court reduced the fine from 575,000 to 325,000 Norwegian kroner.
Hamsun was forced to undergo a psychiatric examination, which concluded that he had "permanently impaired mental faculties," and on that basis the charges of treason were dropped. Instead, a civil liability case was raised against him, and in 1948 he had to pay a ruinous sum to the Norwegian government of 325,000 kroner ($65,000 or £16,250 at that time) for his alleged membership in Nasjonal Samling and for the moral support he gave to the Germans, but was cleared of any direct Nazi affiliation. Whether he was a member of Nasjonal Samling or not and whether his mental abilities were impaired is a much debated issue even today. Hamsun stated he was never a member of any political party. He wrote his last book Paa giengrodde Stier (On Overgrown Paths) in 1949, a book many take as evidence of his functioning mental capabilities. In it, he harshly criticizes the Psychiatrists and the judges and, in his own words, proves that he is not mentally ill.
Knut Hamsun died on February 19, 1952, aged 92, in Grimstad. His ashes are buried in the garden of his home at Nørholm.
A fifteen-volume edition of his complete works was published in 1954. In 2009, to mark the 150-year anniversary of his birth, a new 27-volume edition of his complete works was published, including short stories, poetry, plays, and articles not included in the 1954 edition. For this new edition, all of Hamsun's works underwent slight linguistic modifications in order to make them more accessible to contemporary Norwegian readers. Fresh English translations of two of his major works, Growth of the Soil and Pan, were published in 1998.
Landstrykere (Wayfarers) is a Norwegian film from 1990 directed by Ola Solum.
A biopic entitled Hamsun was released in 1996, directed by Jan Troell, starring Max von Sydow as Hamsun.
On August 4, 2009, the Knut Hamsun Centre was opened in Hamarøy. Since 1916, several of Hamsun's works have been adapted into motion pictures.
Hamsun’s works remain popular. In 2009, a Norwegian biographer stated, "We can’t help loving him, though we have hated him all these years ... That’s our Hamsun trauma. He’s a ghost that won’t stay in the grave."