1837, from French Roi Charmant, name of the hero of Comtesse d'Aulnoy's "L'Oiseau Bleu" (1697). In English he was adopted into native fairy tales including "Sleeping Beauty" and "Cinderella."
As for me, I have always agreed with the fairy books that the moment when Prince Charming arrives is the perfect climax. Everything that goes before in the life of a girl simply leads up to that moment, and everything that comes after dates from it; and while the girl of the twentieth century, sallying forth in search of adventure, may not hope to meet at the next turn a knight in shining armor, or a sighing troubadour, she does hope, if she is normal and has the normal dreams of a girl, to find her hero in some of the men who pass her way. [Temple Bailey, "Adventures in Girlhood," Philadelphia, 1919]