Where did it come from?
As with many of these phrases, the history of its origin differs from resource to resource. The Oxford English Dictionary states this phrase is actually an alteration of the Scottish term “dagone” which is also a minced oath for “goddamn” as well as “dog on it.” Another imprecation is the old English “pox on it.”
The use of “doggone it” has been used in America since the 19th century and first made its appearance in writings about the American Old West. English writer George Frederick Ruxton wrote in his semi-fictional book Life in the Far West in 1848:
“‘Fire be dogged,’ says old Rube.” … “I’m dog-gone if it wasn’t.”