I recall reading about a medieval Holy Roman Emperor, or heir apparent, that didn't get to rule over the kingdom. He was the last in line from a major dynasty, and held a high amount of prestige. He travelled around, undertaking various adventures and battles, especially in the east. He was a popular figure because of his exploits. Whatever the condition of Germany was at the time, he didn't get to have a typical rule. I think it was in the 15th century, possibly during the Hussite Crusades. It sounds obscure but he was actually the emperor, or was quite legendary.
I looked at Wikipedia's list of emperors to no avail. I realized he may have been a king of Bohemia, so I went back and looked at that. It was John the Blind, son of Henry VII, Holy Roman Emperor. The Luxemburgs lost the crown to the Louis IV Wittelsbach. Henry therefore was only king of Bohemia and Poland, but never emperor. I was going to sack my question, but I highly recommend reading about this fellow.
You may be referring to Don Juan of Austria. He never became Holy Roman Emperor because he was the illegitimate son of Emperor Charles V, in the sixteenth century.
But "son" of the Emperor helped get him into high military positions, where his abilities allowed him to have many adventures, and to make a name for himself, notably at the (naval) Battle of Lepanto against the Turks.