From Ryan Tamares on Facebook, ultimately from xkcd:
Yes, a syntactic ambiguity, of a very well-known type.
What’s going on here is the choice between parsing the example as:
(1) … [ [saved from being slaughtered] [by an intelligent spider named Charlotte] ]
(with by an intelligent spider named Charlotte modifying saved from being slaughtered, which is what the writer intended) or as
(2) … [saved from being [slaughtered [by an intelligent spider named Charlotte] ] ]
(with by an intelligent spider named Charlotte modifying slaughtered). In both cases, by an intelligent sider named Charlotte modifies what precedes it, but what precedes it is differently understood. It’s a structural thing.
(1) has what we call in the business high attachment; the modifier goes with the larger constituent preceding it, with the main verb saved. (2) has what we call in the business low attachment; the modifier goes with the smaller constituent preceding it, with the main verb slaughtered.
As I’ve written about many times — here and here, for example — Low Attachment seems to be a default, but how things are likely to be understood in particular cases depends on several other factors, having to do with (among other things) the discourse prominence of the referents, the real-life likelihood of particular relationships among the referents, and the actual real-life relationships. In this case, knowing the story means that you know the spider was not only much more likely to save the pig than to slaughter him, but in fact did save him.
In any case, there is indeed a syntactic ambiguity here, having to do with the way constituents are grouped into larger constituents ((1) vs.(2)).