Holy Ned is a particularly blasphemous minced oath, although it is generally seen as quite milquetoast. Variations of the exclamation "holy hell" have been around for a long time, including Holy cow (1905), holy mackerel (1803), and holy moly (1920s). Holy Ned has been around since at least 1868, when it appeared in Adrift and at anchor by Alfred Sylvester.
Holy Ned is an edgy choice because Ned was an American slang term for the devil, first recorded in 1849. It is worth noting, however, that Ned is a shortening of the name Edward, and Ned's diminutive, Neddy, has been used to refer to a donkey since at least 1790. So if someone accuses you of devil worship, you do have plausible deniability.
While holy Ned is perhaps most often used as a stand-alone exclamation, it also appears in phrases such as 'to raise Holy Ned' and 'all Holy Ned broke loose'; Ned also appears in the Americanism 'tearing up Ned'. And for the truly cautious, Holy Ned also makes an occasional appearance in the doubly-minced 'golly Ned'.