"perplex or embarrass by suddenly exciting the conscience, discomfit, make ashamed," late 14c., earlier "lose one's composure, be upset" (early 14c.), from Old French esbaiss-, present stem of esbaer "lose one's composure, be startled, be stunned."
Originally, to put to confusion from any strong emotion, whether of fear, of wonder, shame, or admiration, but restricted in modern times to effect of shame. [Wedgwood]
The first element is es "out" (from Latin ex; see ex-). The second may be ba(y)er "to be open, gape" (if the notion is "gaping with astonishment"), possibly ultimately imitative of opening the lips. Middle English Dictionary also compares Old French abaissier "bow, diminish, lower oneself" (source of abase). Related: Abashed; abashing. Bashful is a 16c. derivative.