The only free and comprehensive online etymological dictionary of the Spanish language
hambre f. (Noun) "hunger"
10th cent. Old Spanish fambre, earlier famne. The n in famne was tapped by the tongue and became *famre. *b intervenes between *mr via epenthesis to become fambre. From Vulgar Latin *famine 'id.,' earlier famis, from Latin fames 'id.' Of unknown origin. A connection to *dhH- "to disappear" has been proposed, albeit with its own problems. See Walde & Hoffman (1954) for further discussion.
Indo-European
Romance
Asturian fame, Portuguese fome, Galician fame, Catalan fam, French faim, Italian fame, Aromanian foami, Romanian foame, Sardinian fàmene

In the 3rd or 4th cent. text Appendix Probi we find the line: fames non famis "[the word for 'hunger' is] fames, not famis." The author's spelling correction proves how the word was pronounced by common speakers, and offers a rare glimpse of the evolution of Latin into Romance languages such as Spanish.

Words for hunger tended to be borrowed into Indo-European languages or internally innovated. "There is only one word reconstructed in Proto-Indo-European that means 'hunger' (a Hittite-Tocharian isogloss) and even this is problematic in tha a comparison between Hit kāst- 'hunger' and Toch B kest 'hunger' still only yields a PIE *Kos-t-, i.e. we can only say that the word begins with a velar but must be uncertain which velar that is (it could be *ges- for example)." ~ Mallory & Adams, The Oxford Introduction to Proto-Indo-European and the Proto-Indo-European World (2006)