mid-13c., kukewald, from Old French cucuault, from cocu (see cuckoo) + pejorative suffix -ault, of Germanic origin. So called from the female bird's alleged habit of changing mates, or her authentic habit of leaving eggs in another bird's nest.
In Modern French the identity is more obvious: Coucou for the bird and cocu for the betrayed husband. German Hahnrei (13c.), from Low German, is of obscure origin. The second element seems to be connected to words for "ardent," and suggests perhaps "sexually aggressive hen," with transferal to humans, but Kluge suggests rather a connection to words for "capon" and "castrated." Related: Cuckoldry.