After sitting a little while Miss Crawford was up again. "I must move," said she; "resting fatigues me. I have looked across the ha-ha till I am weary. I must go and look through that iron gate at the same view, without being able to see it so well."
-- Jane Austen, Mansfield Park, 1851
He wondered from which window Hamilton Rowan had thrown his hat on the ha-ha and had there been flowerbeds at that time under the windows.
-- James Joyce, Portrait of the Artist As a Young Man, 1916
A ha-ha is a boundary wall concealed in a ditch so that it does not intrude upon the view... The name ha-ha derives from the exclamation that a stranger might make upon coming upon such a ditch unexpectedly from the top of the wall. An experience of this kind could, of course, be highly dangerous to the unwary.
-- Dave King, The Ha-Ha, 2005
But the peril is an illusion, because the main surfaces are separated from the edges by a ha-ha, a sunken walkway that functions as a barrier.
-- David Owen, "The Psychology of Space," The New Yorker, January 21, 2013
Ha-ha comes from the French ha!, a common exclamation of surprise. Because ha-has are designed to be difficult to see, people would shout in surprise upon stumbling into them.