Hans Christian Andersen was born in the town of Odense, Denmark, on Tuesday, 2 April 1805. He was an only child. Andersen's father, also Hans, considered himself related to nobility. His paternal grandmother had told his father that their family had in the past belonged to a higher social class, but investigations prove these stories unfounded. Theories that Andersen may have been an illegitimate son of King Christian VIII persist.
Andersen's father, who had received an elementary education, introduced Andersen to literature, reading him Arabian Nights.[Andersen's mother, Anne Marie Andersdatter, was uneducated and worked as a washerwoman following his father's death in 1816, remarrying in 1818. Andersen was sent to a local school for poor children where he received a basic education and was forced to support himself, working as a weaver's apprentice and, later, for a tailor. At 14, he moved to Copenhagen to seek employment as an actor. Having an excellent soprano voice, he was accepted into the Royal Danish Theatre, but his voice soon changed. A colleague at the theatre told him that he considered Andersen a poet. Taking the suggestion seriously, Andersen began to focus on writing.
His initial attempts at writing fairy tales were revisions of stories that he heard as a child. Andersen brought this genre to a new level by writing a vast number of fairy tales that were both bold and original. Initially they were not met with recognition, due partly to the difficulty in translating them and capturing his genius for humor and dark pathos.
It was during 1835 that Andersen published the first two installments of his immortal Fairy Tales (Danish: Eventyr; lit. "fantastic tales"). More stories, completing the first volume, were published in 1837. The collection consists of nine tales that includes The Tinderbox, The Princess and the Pea, Thumbelina, The Little Mermaid and The Emperor's New Clothes. The quality of these stories was not immediately recognized, and they sold poorly. At the same time, Andersen enjoyed more success with two novels, O.T. (1836) and Only a Fiddler (1837);the latter was reviewed by the young Søren Kierkegaard
After a visit to Sweden in 1837, Andersen became inspired by Scandinavism and committed himself to writing a poem that would convey the relatedness of Swedes, Danes, and Norwegians. It was in July 1839 during a visit to the island of Funen that Andersen first wrote the text of his poem, Jeg er en Skandinav ("I am a Scandinavian"). Andersen composed the poem to capture "the beauty of the Nordic spirit, the way the three sister nations have gradually grown together," as part of a Scandinavian national anthem. Composer Otto Lindblad set the poem to music, and the composition was published in January 1840. Its popularity peaked in 1845, after which it was seldom sung. Andersen spent two weeks at the Augustenborg Palace in the autumn of 1844.
Andersen returned to the fairy tale genre in 1838 with another collection, Fairy Tales Told for Children. New Collection. First Booklet (Eventyr, fortalte for Børn. Ny Samling), which consists of The Daisy, The Steadfast Tin Soldier and The Wild Swans.
The year 1845 heralded a breakthrough for Andersen with the publication of four different translations of his fairy tales. The Little Mermaid appeared in the periodical Bentley's Miscellany. It was followed by a second volume, Wonderful Stories for Children. Two other volumes enthusiastically received were A Danish Story Book and Danish Fairy Tales and Legends. A review that appeared in the London journal The Athenæum (February 1846) said of Wonderful Stories, "This is a book full of life and fancy; a book for grandfathers no less than grandchildren, not a word of which will be skipped by those who have it once in hand."
Andersen would continue to write fairy tales, and he published them in installments until 1872.
In 1851, he published to wide acclaim In Sweden, a volume of travel sketches. A keen traveler, Andersen published several other long travelogues: Shadow Pictures of a Journey to the Harz, Swiss Saxony, etc. etc. in the Summer of 1831, A Poet's Bazaar, In Spain, and A Visit to Portugal in 1866. (The latter describes his visit with his Portuguese friends Jorge and Jose O'Neill, who were his fellows in the mid-1820s while living in Copenhagen.) In his travelogues, Andersen took heed of some of the contemporary conventions about travel writing, but always developed the genre to suit his own purposes. Each of his travelogues combines documentary and descriptive accounts of the sights he saw with more philosophical passages on topics such as being an author, immortality, and the nature of fiction in the literary travel report. Some of the travelogues, such as In Sweden, even contain fairy-tales.
In the 1840s, Andersen's attention returned to the stage, but with little success. He had better fortune with the publication of the Picture-Book without Pictures (1840). A second series of fairy tales began in 1838 and a third in 1845. Andersen was now celebrated throughout Europe, although his native Denmark still showed some resistance to his pretensions.Between 1845 and 1864, H. C. Andersen lived at 67 Nyhavn, Copenhagen, where a memorial plaque now stands
In June 1847, Andersen paid his first visit to England and enjoyed a triumphal social success during the summer. The Countess of Blessington invited him to her parties where intellectual people could meet, and it was at one party that he met Charles Dickens for the first time. They shook hands and walked to the veranda which was of much joy to Andersen. He wrote in his diary, "We had come to the veranda, I was so happy to see and speak to England's now living writer, whom I love the most."
The two authors respected each other's work and had something important in common as writers: Depictions of the poor and the underclass, who often had difficult lives affected both by the Industrial Revolution and by abject poverty. In the Victorian era there was a growing sympathy for children and an idealization of the innocence of childhood.Ten years later, Andersen visited England again, primarily to visit Dickens. He extended a brief visit to Dickens' home at Gads Hill Place into a five-week stay, to the distress of Dickens' family. After Andersen was told to leave, Dickens stopped all correspondence between them, to the great disappointment and confusion of Andersen, who had quite enjoyed the visit and never understood why his letters went unanswered.