The Walking Dead is based on a comic series of the same name written by Robert Kirkman, who also works as an executive producer on the show. The comics may have inspired the show, but they are not quite alike. They share many of the same themes, characters, and events, but adapting something for the screen always results in some changes. But how much of the show is taken directly from its source material? Does The Walking Dead show follow the comics?
It does... to an extent. Many moments from the comics play out onscreen almost exactly the same way they did on the page, especially when it came to major Negan moments in Season 7. His murder of Glenn and later the disemboweling of Spencer were fairly exact recreations, though there were some differences when it came to context. The show often alters the context around specific comic book moments to maintain the surprise factor. That's why some characters who are alive in the comics are dead on the show, and vice-versa.
For example, Carol died early on in the comics, but survived to become one of the show's most impressive characters. Abraham's comic death on the show was given to Denise instead, and he met a different fate. Daryl didn't even exist in the comics, and Rick and Michonne never got together on the page. There are a myriad of differences between the two versions of The Walking Dead, but the show always keeps the comics in mind.
If anything, it seems like the show is edging closer to the comics the longer it goes on. Before Season 7 began airing, executive producer Greg Nicotero told ComicBook.com, "There are some great moments from the comic books that we're going to get a chance to experience. To me it feels like we may be a little closer in nature to certain beats in the graphic novel than we have in the past, but that could just be my interpretation of it."
That definitely seems to be true, with many comic moments and characters being represented faithfully on screen in Season 7, from Ezekiel's tiger to Negan's bat to Carl's tour through the Sanctuary. However, there were still deviations, such as Carol's connection with the Kingdom and the introduction to Oceanside (which doesn't come until after Negan is defeated in the comics, and happens in a very different way).
So while there are definitely differences between the show and the comics, there is also a lot of overlap. After all, one wouldn't exist without the other.