The Ugly Ducking was autobiographical.
Before becoming a writer, Andersen tried his hand--or foot--at ballet but was rejected because of his lanky stature; acting and singing didn't pan out either, due to his awkward appearance (think: Danish Abraham Lincoln).
He was desperately afraid of fires.
During his travels, Andersen always carried a thick rope in his trunks--long enough to throw out of a second-story window should his lodging be engulfed in flames. He was also a hypochondriac and a notoriously demanding houseguest who quite famously overstayed his welcome (by a month) when visiting Charles Dickens.
He was an avid diarist--and champion masturbator.
Andersen vigorously documented even the most banal details of his life. Scholars believe that he even noted his masturbatory habits by marking small crosses in the corners of his diaries' pages--there are a lot of crosses.
He probably died a virgin.
Some historians believe that Andersen was the perpetual victim of unrequited love, choosing women who were either already married or far beyond his station. Others cite a very romantic love letter penned to a dear male friend. Whether he was a deeply closeted homosexual, bisexual, or even perhaps asexual, many scholars agree that he never got laid.