The modern sense seems to have developed during the 17th century. When the word arrived in English from French in the 14th century, it lacked any nuance of affectation: it meant "grave, serious, solemn". This is the sense we find in Shakespeare.
When Malvolio imagines himself giving "a demure travel of regard" to ask for his kinsman Sir Toby (Twelfth Night, II.v.52) he would have been thinking of himself more as frowning than smiling. Lucrece's maid greets her mistress with a "demure good-morrow" (The Rape of Lucrece, 1219): she is being grave, not coquettish.
And we must avoid any hint of "campness" when the Surveyor describes a monk as having "demure confidence" (Henry VIII, I.ii.167) or Falstaff refers to Prince John and his ilk: "There's never none of these demure boys come to any proof" (Henry IV Part 1, IV.iii.89).
We move a little nearer to the modern sense when the word is used as a verb. Cleopatra tells Antony: "Your wife Octavia... shall acquire no honourDemuring upon me" (Antony and Cleopatra, IV.xv. 29). This seems to mean "gaze decorously". The demure look is waiting in the wings.