Is human DNA closer to chimpanzees or pigs?

Humans and chimpanzees share a much more recent common ancestor than humans and pigs. This results in humans sharing more of their genome with chimps than they do with pigs.

Even though a human's genetic code is more like a chimp's than it is like a pig's, all eukaryotic organisms share a significant amount of genetic code, vertebrates share even more, and mammals share even more than that; a human's DNA more closely resembles a pig's than it does a lizard's, and it more closely resembles a lizard's than it does a bacterium's.