The wikipedia article about the blue division mentions Hitler planning to replace Spain's dictator Francisco Franco with the commander of the Blue Division, Agustín Muñoz y Grandes. I looked for more information on it and, while I did find a couple of pages mentioning it, nowhere was anything said about it.
So how much do we know about this plan? How serious was Hitler about it and why was it desestimated?
I was hoping that someone with more knowledge might come along and address this in more depth, but I can at least give a bare-bones answer, based more on familiarity with histories of Spain during the Second World War rather than Hitler's diplomatic proclivities. Although this incident is alluded to in histories of Spain, it tends to be skipped over and discussed in the context of Franco's own domestic and international manoeuvring rather than the plot itself. This focus is driven by the main axis of historiographical debate - the extent that Franco was either a cunning, pragmatic diplomat who safeguarded Spanish neutrality throughout the conflict, or whether he was lucky that circumstances prevented his joining the Axis when he would have liked to, and was therefore spared Allied intervention later. As such, this incident is normally discussed in the context of Franco's efforts to consolidate power, in particular his decision to recall Muñoz y Grandes and prevent any incipient plot from coming to fruition.
In any case, the picture of Hitler's 'plan' to replace Franco with Agustín Muñoz y Grandes is very much that this was far from a firm plot. Hitler was frustrated in Franco's unwillingness to cooperate fully with his plans (or, at least, to cooperate without making unrealistic material and territorial demands), and clearly entertained the notion of securing a more pliable partner in Madrid. How to achieve this was rather vague - one option was invading, but there was also consideration of forcing a political change in the regime. Muñoz y Grandes might have had a role in either - as a replacement for Franco after a successful invasion, or as a spearhead of a government change to reduce Franco's political power and align the government more closely with the Axis. Muñoz y Grandes was a commited admirer of Nazi Germany, was considered a competent and effective military leader and, importantly, was close to hand on the Eastern Front, so he fit the bill. Muñoz y Grandes was canny enough not to commit to overthrowing Franco, but was reportedly enthusiastic about joining the Franco regime as a pro-Axis voice (as Head of Government, while retaining Franco as a weakened Head of State). Even so, Franco, having gotten wind of this discussion, recalled the general to Spain as soon as he could, giving him a (prestigious) administrative job rather than command of troops just in case.
By all accounts, actual German intervention in Spain was unlikely by this stage. The main objective would have been taking Gibraltar (Operation Felix), but the logistics of such an operation were difficult, requiring full Spanish cooperation and a swift campaign - in other words, impossible if Franco resisted. While I'm sure the German military did draw up plans for invading Spain, it's unlikely that they could have spared the necessary troops from the Eastern Front.
My main source here has been Stanley Payne's book, Fascism in Spain, 1923-1977 (1999). The same author has other work dealing with the period, but this particular account goes into considerably more detail. Most of the history writing I'm aware of that deals with Nazi diplomacy towards Spain concentrate primarily on economics and don't discuss the prospect of invasion, but I can't claim to be particularly well-versed in the literature.