Results on open charm and beauty production and on the search for top production in high-energy electron-proton collisions at HERA are reviewed. This includes a discussion of relevant theoretical aspects, a summary of the available measurements and measurement techniques, and their impact on improved understanding of QCD and its parameters, such as parton density functions and charm- and beauty-quark masses. The impact of these results on measurements at the LHC and elsewhere is also addressed.