The difficulty that many people have in distinguishing between ambiguous and ambivalent shows that all that is needed to create confusion with words is to begin them with several of the same letters. In spite of the fact that these two words have histories, meanings, and origins that are fairly distinct, people often worry about mistakenly using one for the other.
Dating to the 16th century, ambiguous is quite a bit older than ambivalent, which appears to have entered English in the jargon of early 20th-century psychologists. Both words are in some fashion concerned with duality: ambivalent relates to multiple and contradictory feelings, whereas ambiguous often describes something with several possible meanings that create uncertainty.
The words’ etymologies offer some help in distinguishing between them. Their shared prefix, ambi-, means "both." The -valent in ambivalent comes from the Late Latin valentia ("power") and, in combination with ambi-, suggests the pull of two different emotions. The -guous in ambiguous, on the other hand, comes ultimately from Latin agere ("to drive, to lead"); paired with ambi-, it suggests movement in two directions at once, and hence, a wavering or uncertainty.